• Resolved mammono

    (@mammono)


    What do I need to do to restrict access for certain members(staff of website) to access your plugins with user role editor plugin?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Matt Pramschufer

    (@mattpramschufer)

    hey @mammono,
    Do you mean you want your staff to have to purchase the product to see the content? Or do you mean you want your staff to be logged in but NOT see the paywall and see the content?

    Thread Starter mammono

    (@mammono)

    i mean i want to fix author staff can use pay per post only. other staff(information staff QC staff etc.) can not use this plugin Can you tell me which option I should select in user role editor plugin to disable this capability?

    Plugin Author Matt Pramschufer

    (@mattpramschufer)

    @mammono if you are using the premium version you can use https://pramadillo.com/documentation/filters-for-woocommerce-pay-per-post/#wc_pay_per_post_allowed_roles_for_meta_box

    for the free version, there is no filter.

    You could use something like https://www.ads-software.com/plugins/admin-menu-editor/ to hide the main pay for post menu item, then you could use CSS or JS to target the meta box and hide it

    div#wc_pay_per_post_meta_box {
        display: none;
    }
    Thread Starter mammono

    (@mammono)

    I’m deciding whether to buy the premium version or not.
    What I need from your plugin is
    1. Restricting some content from 1 post so readers have to pay to access premium content. which I’ve asked you.
    2. Staff ability management In order not to mess up the role of the staff. from what you recommend If I buy the premium version Do I have to paste the code you provide in the plugin editor?

    Plugin Author Matt Pramschufer

    (@mattpramschufer)

    For any code snippets that you add on your wordpress site, you can do a couple ways, the most popular way is to simply add the code to your child theme’s functions.php, the other way, which is what I really recommend, is to use the plugin called Code Snippets https://www.ads-software.com/plugins/code-snippets/

    Thread Starter mammono

    (@mammono)

    Ok, I’m deciding whether to buy monthly or yearly. I’m no coding expert but for your coding. If I want to hide the metabox from these members, am I setting this right?
    add_filter( ‘wc_pay_per_post_allowed_roles_for_meta_box’, function () {
    return array(‘info_staff’||’QC_staff’||’participant’);
    } );

    • This reply was modified 3 years, 7 months ago by mammono.
    Plugin Author Matt Pramschufer

    (@mattpramschufer)

    Not exactly, it should be like this

    add_filter( 'wc_pay_per_post_allowed_roles_for_meta_box', function () {
         return array('info_staff','QC_staff','participant');
    } );
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘how to config your plugin with user role editor plugin?’ is closed to new replies.