Forum Replies Created
-
In reply to: Roles and Capabilities in bbPress 2.2
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)
In reply to: Roles and Capabilities in bbPress 2.2Hi 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,
LudovicIn reply to: Auto SubscribeHey 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,
LudovicIn reply to: WP-CLI commands for bbPress?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!
In reply to: WP-CLI commands for bbPress?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,
LudovicIn reply to: legend translationI 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 translationThanks @robin-w for your reply!
The dev is Milan, and the plugin GD bbPress Toolbox.
I turn to him to understand more.In reply to: Different displays for method 1 and method 2Hi @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 🇷🇪