How to hide all WooCommerce administration, menus, submenus, meta boxes and widgets … or not

As promised, here is all the code to hide at will all the menus, submenus, meta boxes and desktop widgets of WooCommerce.

You choose from each code which lines you want to apply or not, that is up to you or your tastes.

How to hide Woocommerce menus

/** Hide Woocommerce menus and submenus **/ function wphelp_hide_woo_menus() { //Hide "Marketing". remove_menu_page('wc-admin&path=/marketing'); //Hide "Tools → Scheduled actions". remove_submenu_page('tools.php', 'action-scheduler'); //Hide "WooCommerce". remove_menu_page('woocommerce'); //Hide "WooCommerce → Desktop". remove_submenu_page('woocommerce', 'wc-admin'); //Hide "WooCommerce → Orders". remove_submenu_page('woocommerce', 'edit.php?post_type=shop_order'); //Hide "WooCommerce → Coupons". remove_submenu_page('woocommerce', 'edit.php?post_type=shop_coupon'); //Hide "WooCommerce → Customers". remove_submenu_page('woocommerce', 'wc-admin&path=/customers'); //Hide "WooCommerce → Reports". remove_submenu_page('woocommerce', 'wc-reports'); //Hide "WooCommerce → Settings". remove_submenu_page('woocommerce', 'wc-settings'); //Hide "WooCommerce → Status". remove_submenu_page('woocommerce', 'wc-status'); //Hide "WooCommerce → Extensions". remove_submenu_page('woocommerce', 'wc-addons'); //Hide "Products". remove_menu_page('edit.php?post_type=product'); //Hide "Products → All products". remove_submenu_page('edit.php?post_type=product', 'edit.php?post_type=product'); //Hide "Products → Add new". remove_submenu_page('edit.php?post_type=product', 'post-new.php?post_type=product'); //Hide "Products → Categories". remove_submenu_page('edit.php?post_type=product', 'edit-tags.php?taxonomy=product_cat&post_type=product'); //Hide "Products → Tags". remove_submenu_page('edit.php?post_type=product', 'edit-tags.php?taxonomy=product_tag&post_type=product'); //Hide "Products → Attributes". remove_submenu_page('edit.php?post_type=product', 'product_attributes'); //Hide "Analytics". remove_menu_page('wc-admin&path=/analytics/revenue'); //Hide "Analytics → Revenues". remove_submenu_page('wc-admin&path=/analytics/revenue', 'wc-admin&path=/analytics/revenue'); //Hide "Analytics → Orders". remove_submenu_page('wc-admin&path=/analytics/revenue', 'wc-admin&path=/analytics/orders'); //Hide "Analytics → Products". remove_submenu_page('wc-admin&path=/analytics/revenue', 'wc-admin&path=/analytics/products'); //Hide "Analytics → Categories". remove_submenu_page('wc-admin&path=/analytics/revenue', 'wc-admin&path=/analytics/categories'); //Hide "Analytics → Coupons". remove_submenu_page('wc-admin&path=/analytics/revenue', 'wc-admin&path=/analytics/coupons'); //Hide "Analytics → Taxes". remove_submenu_page('wc-admin&path=/analytics/revenue', 'wc-admin&path=/analytics/taxes'); //Hide "Analytics → Downloads". remove_submenu_page('wc-admin&path=/analytics/revenue', 'wc-admin&path=/analytics/downloads'); //Hide "Analytics → Stock". remove_submenu_page('wc-admin&path=/analytics/revenue', 'wc-admin&path=/analytics/stock'); //Hide "Analytics → Settings". remove_submenu_page('wc-admin&path=/analytics/revenue', 'wc-admin&path=/analytics/settings'); } add_action('admin_menu', 'wphelp_hide_woo_menus', 71);

How to hide Woocommerce metaboxes

/** Hide meta box Woocommerce from edit product and edit order **/ function wphelp_hide_woo_metas() { $screen = get_current_screen(); if ( !$screen ) { return; } //Hide Products Data metabox remove_meta_box('woocommerce-product-data', $screen->id, 'normal'); //Hide Short Description Product Data metabox remove_meta_box('postexcerpt', $screen->id, 'normal'); //Hide Product Gallery metabox remove_meta_box('woocommerce-product-images', $screen->id, 'side'); //Hide Coupon data metabox remove_meta_box('woocommerce-coupon-data', $screen->id, 'normal'); //Hide Order data metabox remove_meta_box('woocommerce-order-data', $screen->id, 'normal'); //Hide Order Items metabox remove_meta_box('woocommerce-order-items', $screen->id, 'normal'); //Hide Downloadable Product Permissions metabox remove_meta_box('woocommerce-order-downloads', $screen->id, 'normal'); //Hide Order Actions metabox remove_meta_box('woocommerce-order-actions', $screen->id, 'side'); //Hide Order Notes metabox remove_meta_box('woocommerce-order-notes', $screen->id, 'side'); } add_action('add_meta_boxes', 'wphelp_hide_woo_metas', 20);

How to hide dashboard widgets from Woocommerce

/** Hide dashboard widgets from Woocommerce **/ function wphelp_hide_woo_dash_widgets() { $screen = get_current_screen(); if ( !$screen ) { return; } //Remove Recent reviews widget remove_meta_box('woocommerce_dashboard_recent_reviews', 'dashboard', 'normal'); //Remove Woocommerce Status widget remove_meta_box('woocommerce_dashboard_status', 'dashboard', 'normal'); } add_action('wp_dashboard_setup', 'wphelp_hide_woo_dash_widgets', 20);

How to hide the integrated Woocommerce admin interface

/** Remove integrated Woocommerce admin interface **/ add_filter( 'woocommerce_admin_disabled', '__return_true' );

How to hide messages about you connecting to

/** Hide connecting to messages **/ add_filter( 'woocommerce_helper_suppress_admin_notices', '__return_true' );

Where should I put these codes

You have two places to put these codes:

  1. If you have created a child theme, you can add it to the end of the functions.php file.
  2. If you prefer to have more control, create a specialized plugin to add these and other customizations.

How should I use them

Simply copy and paste the code(s) you want to use and add them according to your favorite method (see above).

In the case of multiple codes, which hide several elements of WooCommerce, delete or comment (add // in front) the lines you do not want to apply. For example, this will hide the “Marketing” menu:


However, this will not hide it:


Read this post in Spanish: Cómo ocultar toda la administración, los menús, submenús, cajas meta y widgets de WooCommerce … o no

Click to rate this post!
[Total: 1 Average: 5]

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top Skip to content