Remove Settings for WooCommerce For User

0.0/5
<?php
add_action( 'admin_menu', 'remove_menu_pages', 999);
function remove_menu_pages() {
global $current_user;
  
$user_roles = $current_user->roles;
$user_role = array_shift($user_roles);
if($user_role == "shop_manager") {
  $remove_submenu = remove_submenu_page('woocommerce', 'wc-settings');
}

}

Comments and reviews

{{ reviewsTotal }} Review
{{ reviewsTotal }} Reviews
{{ options.labels.newReviewButton }}
{{ userData.canReview.message }}

Description

This snippet was fetched automatically from WPDistro.cz projects.

Author

Tags

This snippet is untagged