#6871
Vladimir
Keymaster

Hi,

Comment lines with tabs to leave, and uncomment lines with tabs you wish to hide/remove.


add_filter('woocommerce_settings_tabs_array', 'change_wc_settings_tabs', 30);

function change_wc_settings_tabs( $pages ) {
    

    $user = wp_get_current_user();
    if ( in_array( 'orders_manager', $user->roles ) ) {
        //unset( $pages['general']);      // General
        //unset( $pages['products']);     // Products
        //unset( $pages['tax']);          // Tax
        unset( $pages['checkout']);       // Payments
        //unset( $pages['account']);        // Accounts & Privacy
        //unset( $pages['email']);          // Emails
        //unset( $pages['advanced']);       // Advanced
    }
  
  return $pages;
}