kilbot
2/2/2016 - 1:53 AM

Example of removing the support menu item from WooCommerce POS for non super admins

Example of removing the support menu item from WooCommerce POS for non super admins

<?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');