This setting is very important because some time we need some think special
One of our client need that a USER (Shop manager) will not excises the woocommerce setting because in this section your payment gateway Is configure .If someone change your payment gateway for some time at that time hole sale will credited in his account .

Paste this code in Funtion.php

/**
 * @snippet       How To Hide Woocommerce Settings For Specific User
 * @Tutorial      http://wpadmin.in/tutorials/plugins/woocommerce/how-to-hide-woocommerce-settings-for-specific-user/
 * @Author        Wpadmin
 * @Compatible    WooCommerce All Version
 */


add_action( 'admin_menu', 'wooninja_remove_items', 99, 0 );
function wooninja_remove_items() {
 
// menu names to remove
$remove = array( 'wc-settings','wc-status','wc-addons');
 
foreach ( $remove as $slug ) {
if ( ! current_user_can( 'update_core' ) ) {
remove_submenu_page( 'woocommerce', $slug );
}
}
}

/**
 * @snippet       How To Hide Woocommerce Settings For Specific User 
*/

LEAVE A REPLY

Please enter your comment!
Please enter your name here