How to remove submenus from WooCommerce admin menu


add_action( 'admin_menu', 'woo_remove_admin_submenus', 999 );
function woo_remove_admin_submenus() {
	remove_submenu_page( 'woocommerce', 'wc-status' );
    remove_submenu_page( 'woocommerce', 'wc-addons');
}
/*
 ["woocommerce"]=>
  array(7) {
    [0]=>
    array(4) {
      [0]=>
      string(11) "WooCommerce"
      [1]=>
      string(18) "manage_woocommerce"
      [2]=>
      string(11) "woocommerce"
      [3]=>
      string(11) "WooCommerce"
    }
    [1]=>
    array(4) {
      [0]=>
      string(6) "Orders"
      [1]=>
      string(16) "edit_shop_orders"
      [2]=>
      string(29) "edit.php?post_type=shop_order"

      [3]=>
      string(6) "Orders"
    }
    [2]=>
    array(4) {
      [0]=>
      string(7) "Coupons"
      [1]=>
      string(17) "edit_shop_coupons"
      [2]=>
      string(30) "edit.php?post_type=shop_coupon"

      [3]=>
      string(7) "Coupons"
    }
    [3]=>
    array(4) {
      [0]=>
      string(7) "Reports"
      [1]=>
      string(24) "view_woocommerce_reports"
      [2]=>
      string(10) "wc-reports"
      [3]=>
      string(7) "Reports"
    }
    [4]=>
    array(4) {
      [0]=>
      string(8) "Settings"
      [1]=>
      string(18) "manage_woocommerce"
      [2]=>
      string(11) "wc-settings"
      [3]=>
      string(20) "WooCommerce Settings"
    }
    [6]=>
    array(4) {
      [0]=>
      string(7) "Add-ons"
      [1]=>
      string(18) "manage_woocommerce"
      [2]=>
      string(9) "wc-addons"
      [3]=>
      string(30) "WooCommerce Add-ons/Extensions"
    }
    [7]=>
    array(4) {
      [0]=>
      string(15) "Perfect SEO url"
      [1]=>
      string(14) "manage_options"
      [2]=>
      string(6) "wc-psu"
      [3]=>
      string(15) "Perfect SEO url"
    }
  }

 */

Join The Conversation

You can try find out more about How to remove submenus from WooCommerce admin menu
JUST USE THIS FORM FOR SEARCH


Facebook Conversations

 

Download Library