[Solved] Allow only certain roles to comment
I've tried to use the "Disable commenting for roles" inside WPDISCUZ > Forms but i can't make it work properly... Let me explain so maybe you can help me with this. 🤯
I'm using "Paid Membership PRO" in order to manage monthly subscriptions. This plugins set a secondary user role for all users. So, if someone subscribes to our PlanA he gets SUBSCRIBER role and PLAN-A role (2 roles for each user)
I want to set the WPDiscuz form allowing to comment only to Plan-A roles (selecting all roles except PLAN-A), but as the PLAN-A role users have in addition automatically a SUBSCRIBER role the form does not allow this because the subscribe role is selected in the "Disable commenting for roles" function in the form options.
I have tried to deselect SUBSCRIBERS and PLAN-A but obviously doing it this way everyone can comment because everyone has a subscriber role in addition to its plan role.
Phew... a bit messy everything, hope you understand what I'm trying to say!
Do you have any solution to this?? 😥
would be great to checkbox the roles allowed to comment instead of selecting the ones not allowed to do so.
Thank you in advance for your time!
You should use the wpdiscuz_user_role_can_comment filter.
Thanks Asti! 🙂