Created
March 10, 2017 01:53
-
-
Save danielbitzer/97a62f78f1c25e35ab41d1ff54dba9f9 to your computer and use it in GitHub Desktop.
AutomateWoo - Hide the admin menu from store managers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'admin_menu', 'my_maybe_remove_automatewoo_from_admin_menu', 5 ); | |
function my_maybe_remove_automatewoo_from_admin_menu() { | |
if ( ! current_user_can( 'administrator' ) ) { | |
remove_action( 'admin_menu', [ 'AutomateWoo\Admin', 'admin_menu' ] ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment