• I’m trying to set up some more restricted roles using the Members by MemberPress plugin and having a bit of difficulty giving a specific permission within WooCommerce

    Because our site is a catalog and many of the products are similar I want to be able to give someone permissions to duplicate a draft product which we’re using as a template.
    I’ve been playing around with this and it seems the permission that makes the ‘Duplicate’ option appear is tied to ‘manage_woocommerce’ unfortunately this is the permission that gives them full control of the woocomerce settings… Which I’d rather they didn’t have as we’ll be asking volunteers to add new products in and I’d rather not give them full control of woocommerce…

    How can we separate this? The only permission I can find that gives the ‘Duplicate’ button back is manage_woocommerce…

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @dan190 ,

    If I understand correctly you are using the Members by MemberPress plugin to restrict some permission to specific users. You do not want them to have full WooCommerce control and specifically, you want to hide the “Duplicate” action from their account. Is that right?

    Out of the box, it’s not possible to disable only a specific action. It will require some custom code to be able to hide a specific action from a specific user role. You can find a similar solution to hide “duplicate” action here: https://wordpress.stackexchange.com/a/227157

    You will need to use conditions to identify the user role and hide the button for specific roles. This will require some customization expertise, unfortunately, I do not have an exact example of this.

    More details on WooCommerce Roles and Capabilities: https://docs.woocommerce.com/document/roles-capabilities/

    We have our developer resources portal that can help you get going, so I would recommend you to check it further from here: https://developer.woocommerce.com/

    Apart from that, an option is also to check our customizations page with some partners that can help you doing such services for you and provide additional assistance: https://woocommerce.com/customizations/

    I will keep this thread open to see if someone else can chime in to solve the problem.

    Thank you 🙂

    Thread Starter dan190

    (@dan190)

    Hi Rashed

    Thanks for getting back to me.

    It’s the other way round actually. I want to be able to give the ‘duplicate’ button to people without having to give them ‘manage_woocommerce’ permission because this gives them far too much access.

    It seems odd the duplicate permission is tied to that, it would make more sense to put it either as it’s own permission, or even better just link it to the edit product permission.

    Whilst I can look into the suggestions you’ve provided I feel the better solution is the WooCommerce team setting it so the duplicate button appears if you have edit product, or edit others products permission.

    • This reply was modified 4 years, 7 months ago by dan190.
    • This reply was modified 4 years, 7 months ago by dan190.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Duplicate product permission?’ is closed to new replies.