I want to hide customization yith pos tab for all users aside from admin. how can i do that?

Question

I want to hide the customization yith pos tab for all users aside from admin. how can i do that?

enter image description here

i tried this but did not work

add_filter( 'yith_pos_panel_settings_tabs_array', 'filter_yith_pos_panel_settings_tabs_array', 200, 1 );
function filter_yith_pos_panel_settings_tabs_array( $tabs_array ) {
// Only for "shipping_manager" user role
if( current_user_can( 'YITH_POS_Manager' ) ) {
    // Remove some specific tabs
    unset( $tabs_array['customization'], 
}

return $tabs_array;
}
0
Michael Cantes 3 months 0 Answers 13 views 0

Leave an answer