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".
	//Hide "Tools → Scheduled actions".
	remove_submenu_page('tools.php', 'action-scheduler');
	//Hide "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".
	//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".
	//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);Code language: PHP (php)

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 ) {
	//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);Code language: PHP (php)

How to hide dashboard widgets from Woocommerce

/** Hide dashboard widgets from Woocommerce **/
function wphelp_hide_woo_dash_widgets() {
	$screen = get_current_screen();
	if ( !$screen ) {
	//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);Code language: PHP (php)

How to hide the integrated Woocommerce admin interface

/** Remove integrated Woocommerce admin interface **/
add_filter( 'woocommerce_admin_disabled', '__return_true' );
Code language: PHP (php)

How to hide messages about you connecting to

/** Hide connecting to messages **/
add_filter( 'woocommerce_helper_suppress_admin_notices', '__return_true' );
Code language: PHP (php)

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:

remove_menu_page('wc-admin&path=/marketing');Code language: JavaScript (javascript)

However, this will not hide it:

//remove_menu_page('wc-admin&path=/marketing');Code language: JSON / JSON with Comments (json)

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

How useful was this post?

Click on a smiley to rate it!

Average rating 5 / 5. Vote count: 4

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

3 thoughts on “How to hide all WooCommerce administration, menus, submenus, meta boxes and widgets … or not”

  1. Hi there, if this post is still being monitored, when I try to use:

    remove_submenu_page(‘woocommerce’, ‘wc-admin’);

    It actually disables some other features, like “Customers”.

    Is there a way to hide the “WooCommerce -> Home” submenu without disabling other wc-admin paths?

Leave a Comment

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

Scroll to Top