Ludovic S. Clain (@ludovicsclain)

Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)

  • Ludovic S. Clain
    Participant

    @ludovicsclain

    Hey 👋 
    Thank you @Robin-W,
    In the meantime I got to know the WP-Cli-Cli package specific to WordPress, which does not work either (I opened an issue visible here).

    To locate the context, I use WooCommerce Subscription plugin and I needed that when a subscription is canceled, access to the bbPress forum is blocked.

    I leave here the snippet that I made and that does the job:

    add_action('woocommerce_subscription_status_cancelled', 'block_forum_user_after_subscription_cancellation_s', 10, 1);
    function block_forum_user_after_subscription_cancellation_s($subscription)
    {
        $user_id = $subscription->get_user_id();
        $new_role = 'bbp_blocked';
        bbp_set_user_role($user_id, $new_role);
    }

    (I also have a webhook version with the WordPress Rest API for remote use, if necessary contact me)


    Ludovic S. Clain
    Participant

    @ludovicsclain

    Hi there 👋 

    Thanks to the details of @stanis I am understanding why when I use WP-Cli with the line:
    wp user set-role <User id> bbp_blocked

    It blows up the existing role of the User on WordPress (in my case it was “customer” which becomes ” – no role for this site -“)

    But it’s still unclear for me. How to modify the role of an User on BBPPRESS without touching its WordPress role?

    Because the opposite is also true, if I do :
    wp user set-role <User ID> customer

    This time it is the role of the User on the forum that jumps and becomes “-No Role for these forums-”

    PS: I also tried
    wp user update <User ID> --role=customer --bbp-forums-role=bbp_blocked
    And that doesn’t do the job too 🙁

    Thanks for your lights!
    Warm regards,
    Ludovic

    In reply to: Auto Subscribe

    Ludovic S. Clain
    Participant

    @ludovicsclain

    Hey Pascal 👋 
    I’ve just tried your bbP Toolkit plugin and it works quite well 👏

    But I have an oddity concerning the “Add new users to the default forum(s)” function:

    when I create a user via the admin (Users > Add new), everything is going well, the user is subscribed to the forums by default, but when I register a new user (via the front form), however, no!

    I guess it comes from the “insert_user_meta” filter, it must be different for the registration?

    Thank you for your help!
    Warm regards,
    Ludovic


    Ludovic S. Clain
    Participant

    @ludovicsclain

    It’s odd that bbPress’s WP-CLI commands are being developed as a separate package, keenly that the authors are interested in it, thank you!


    Ludovic S. Clain
    Participant

    @ludovicsclain

    Hi Robin,
    thank you for your reply.

    For your reference, wp-cli commands often (if not all) have default outputs and they do not need to be explicitly declared unless particular outputs are expected.

    Here is a list of all post types available on my WordPress installation:

    https://markuphero.com/share/5dn5FOkMzGNpG9R6Unbx

    As you can see, I have a custom post type named ‘sfwd-lessons’ so if I run the command wp post list --post_type=sfwd-lessons I have all these custom posts which are listed with the default outputs:

    https://markuphero.com/share/8Mbqbgujeaou2QH60l1k

    But when i’m trying wp post list --post_type=topic the output is empty:

    https://markuphero.com/share/3APucSjLM0IHRgLHIuVb

    https://markuphero.com/share/V3pihOOXPNQWUx3Knzqd

    Have you really tried it on your end?

    Warm regards,
    Ludovic

    In reply to: legend translation

    Ludovic S. Clain
    Participant

    @ludovicsclain

    I understand, you have been a great help already by telling me that the problem was not with bbpress, as a user and not being dev, it is sometimes difficult to argue when we are answered in a hurry. I reported the information to Milan, and he agreed to review his copy 🙂

    In reply to: legend translation

    Ludovic S. Clain
    Participant

    @ludovicsclain

    Thanks @robin-w for your reply!
    The dev is Milan, and the plugin GD bbPress Toolbox.
    I turn to him to understand more.


    Ludovic S. Clain
    Participant

    @ludovicsclain

    Hi @robin-w,
    thanks for your reply!

    I managed to reproduce my problem:
    I created a WordPress instance on wptaste.com, reinstalled the essential bbpress plugins as well as Elementor Pro and Astra Pro, trying to redo my settings by hand, the error did not reproduce , I then exported my settings from the original site to re-import them into the test site and there I got the error.

    So I set out to reset my settings in Astra Pro and then redo them by hand, and now everything is back to normal.
    I didn’t understand what it was, but I was able to isolate it and find a solution that didn’t take your time.
    Thanks for putting me on the trail!
    Best regards,
    Ludovic from Reunion island 🇷🇪

Viewing 8 replies - 1 through 8 (of 8 total)