Hi @jimmykwk,
Thanks for the idea – I will add option to hide menu for shop managers in next version.
Meanwhile – your code is not working because you are calling your function too early. Our function is attached to admin_menu with PHP_INT_MAX priority and yours with 11. So I would suggest at first trying to use PHP_INT_MAX as priority, i.e.:
add_action( 'admin_menu', 'remove_unused_shopmanager_menu', PHP_INT_MAX );
And if this won’t work – try attaching it through init hook, i.e.:
add_action( 'init', 'attach_remove_unused_shopmanager_menu' );
function attach_remove_unused_shopmanager_menu() {
add_action( 'admin_menu', 'remove_unused_shopmanager_menu', PHP_INT_MAX );
}
Hope that helps. And if you like the plugin, please consider leaving us a rating.
-
This reply was modified 7 years, 9 months ago by
Algoritmika.
Thanks @algoritmika, solved with PHP_INT_MAX priority on admin_menu hook.
Happy to hear it’s working @jimmykwk! Please let me know if you need anything else.
Hi @jimmykwk,
Just wanted to let you know that I’ve just released new plugin version 1.2.2 and there, as promised, I’ve added two new options:
- Hide “Renumerate Orders” admin menu for roles
- Hide “Custom Order Numbers” admin settings tab for roles
Hope that will be useful for you.
Hi @algoritmika, that’s awesome! thank you very much!
Sure, no problem @jimmykwk. Happy to help.