Hide Extra Product Option Link from admin menu
-
Hi there,
I am trying to hide the admin link under products to extra product options. I need to hide it so my shop managers do not go in there and change the fields that we have created. I was able to hide other admin menu items, but it seems I can’t hide your link. Any help would be appreciated. Attached is the code that I have used, which has worked for other items.
<?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 == "print_shop_staff") { $remove_submenu = remove_submenu_page('woocommerce', 'th_checkout_field_editor_pro'); $remove_submenu = remove_submenu_page('woocommerce', 'wc-settings'); $remove_submenu = remove_submenu_page('woocommerce', 'wc-status'); $remove_submenu = remove_submenu_page('woocommerce', 'wc-addons'); } } ?>
This the code I tried to use to hide link from admin menu, but it did not work.
$remove_submenu = remove_submenu_page('products', 'thwepof_extra_product_options');
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Hide Extra Product Option Link from admin menu’ is closed to new replies.