• Is there a way to restrict users who aren’t a certain role or member type to add reviews? I’m using Paid Memberships Pro and I would like to prohibit free members from leaving reviews.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey this plugin is a great addition! I have the same question as badomn83. In addition, I have just one member type that I would like to receive reviews.

    so: member type A gets reviewed
    Member type B can leave reviews of member type A

    That would be so amazing to have!

    Plugin Contributor Varun Dubey

    (@vapvarun)

    @badomn83 @mische7
    We do not have any inbuilt features, but using membership plugins like PM Pro you can limit ‘add-review’ slug access for certain user roles.
    Else we also have a exclude user id parameter in plugin setting, which can be extended via overriding bupr_add_review_button_on_member_header() function.

    Hi Varun. Just getting around to this now – sorry for the silence.
    Would you mind showing an example of how to use the function? I’m sure there are many ways to achieve this I think it’s simplest to only show the ‘add review’ for on the page of the service-pro. (I’m just learning so pls forgive if this is all kinds of wrong)
    This is my sad attempt:

    function my_add_review_button_on_member_header() {

    $member_type = bp_get_member_type( bp_displayed_user_id() );

    if ( ! bp_is_my_profile() && $member_type == ‘service-pro’) {
    return;
    }
    }

    add_action( ‘bupr_add_review_button_on_member_header’, ‘my_add_review_button_on_member_header’ );

    Hi @mische7 did you find a way to restrict for user role?

    Like For example to restrict for “contributor” role , how would the code be?

    • This reply was modified 4 years, 5 months ago by evillizard.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Restrict Adding Reviews by role or member type’ is closed to new replies.