Hello. Thank you for contacting the Toolset support.
To remove woo commerce settings menu for specific role, you should use following code - Try to add following code to your current theme's functions.php file:
I created a role 'Shop Manager Test', how do I check what is the value to put into 'YOUR-ROLE'.
Tried these and they don't work
if($user_role == "Shop Manager Test") {
if($user_role == "shop-manager-test") {
And the code that you provided only hides the menu but user can still access it if they know the url?
Thanks.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
Hi, I'm also trying to restrict access to the "Settings" tab for a user role of "Reception" and I tried using the code above, but still doesn't work. Tried both suggestions inside the code: "woocommerce_settings" and also "wc-settings" but it still doesn't work.
Any advice?
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.