Forums
Home / Plugin: Code Snippets / Disable for WooCommerce Store Manager
(@naestanteonline)
3 years, 11 months ago
Hi. How can I disable the code snippets menu from being accessed by users with store manager roles on WooCommerce?
(@bungeshea)
3 years, 9 months ago
Do you mean the Shop Manager role? I’m not too familiar with WooCommerce, but anyone without the manage_options capability should not be able to access the Code Snippets menu.
manage_options
If you need to change what capability this is, you can do so like this:
add_filter( 'code_snippets_cap', function ( $cap ) { return 'manage_woocommerce'; } );