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.