The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Allow only certain ...
 
Share:
Notifications
Clear all

[Solved] Allow only certain roles to comment

3 Posts
2 Users
0 Reactions
2,496 Views
Posts: 5
 Rem
Topic starter
(@rem)
Active Member
Joined: 4 years ago

Hi @asti

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!

Topic Tags
2 Replies
Asti
Posts: 7617
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

Hi @rem,

You should use the wpdiscuz_user_role_can_comment filter. 

More info here: https://wpdiscuz.com/docs/codex/filters/wpdiscuz_user_role_can_comment/

Posts: 5
 Rem
Topic starter
(@rem)
Active Member
Joined: 4 years ago

Thanks Asti! 🙂

Share: