Last active
April 29, 2018 05:17
-
-
Save kilbot/b927d4ca832734a04338 to your computer and use it in GitHub Desktop.
Example of removing the support menu item from WooCommerce POS for non super admins
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 | |
| // place this in your theme functions.php file | |
| function my_custom_pos_menu($menu){ | |
| if( is_super_admin() ){ | |
| return $menu; | |
| } | |
| foreach($menu as $key => $item){ | |
| if($item['id'] == 'support') | |
| array_splice($menu, $key, 1); | |
| } | |
| return $menu; | |
| } | |
| add_filter('woocommerce_pos_menu', 'my_custom_pos_menu'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment