Disable WooCommerce Marketing Menu in WordPress Admin

WooCommerce adds a Marketing menu to the WordPress admin with an overview page, recommended extensions and the Coupons list. On many stores nobody uses it, and on client sites it is one more menu to explain. This snippet will disable the WooCommerce Marketing menu and move Coupons to the WooCommerce menu, so nothing you need goes missing.

The older version of this post emptied the woocommerce_marketing_menu_items filter. In current WooCommerce that filter only adds extra items to Marketing, so the menu stayed. This version removes the menu itself.

The snippet

<?php
/**
 * Remove the WooCommerce "Marketing" menu from wp-admin and keep Coupons under WooCommerce.
 */

add_action( 'admin_menu', 'dpc_remove_wc_marketing_menu', 999 );

function dpc_remove_wc_marketing_menu(): void {
	if ( ! class_exists( 'WooCommerce' ) ) {
		return;
	}

	remove_menu_page( 'woocommerce-marketing' );

	// Coupons live under Marketing. Give them a normal entry under WooCommerce instead.
	if ( function_exists( 'wc_coupons_enabled' ) && wc_coupons_enabled() ) {
		remove_submenu_page( 'woocommerce', 'coupons-moved' ); // WooCommerce's admin-only redirect item.
		add_submenu_page(
			'woocommerce',
			__( 'Coupons', 'woocommerce' ),
			__( 'Coupons', 'woocommerce' ),
			'edit_shop_coupons',
			'edit.php?post_type=shop_coupon'
		);
	}
}

// WooCommerce highlights "Marketing" on coupon screens; point the highlight at the new item.
add_action( 'admin_head', 'dpc_wc_coupon_menu_highlight', 100 );

function dpc_wc_coupon_menu_highlight(): void {
	global $parent_file, $submenu_file, $post_type;

	if ( 'shop_coupon' === $post_type && 'woocommerce-marketing' === $parent_file ) {
		$parent_file  = 'woocommerce'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
		$submenu_file = 'edit.php?post_type=shop_coupon'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
	}
}

How it works

  • WooCommerce registers the Marketing menu with the slug woocommerce-marketing on admin_menu at priority 6 and sorts its submenu at 99. The snippet runs at 999, after that, and calls remove_menu_page().
  • WooCommerce moved the Coupons list into Marketing. Removing the parent would also hide Coupons, so the snippet adds edit.php?post_type=shop_coupon under WooCommerce for users with the edit_shop_coupons capability, which shop managers have.
  • WooCommerce also adds its own Coupons item under WooCommerce, which only redirects and only shows for administrators. The snippet removes it so the menu does not show Coupons twice.
  • On coupon screens WooCommerce sets $parent_file to woocommerce-marketing to open that menu. The admin_head callback at priority 100 points it at the WooCommerce menu and the Coupons item instead.
  • Nothing happens when coupons are disabled in WooCommerce → Settings → General or when WooCommerce is not active.

Add it with Scripts Organizer

In Scripts Organizer go to Code Blocks → Add New and give the block a name. Set Trigger location to Admin only, tick PHP under Script location, paste the code into the PHP editor and publish. Leave Action/Hook empty.

The menu only exists in wp-admin, so the code does not need to load on the front end. The older post said to load it on the front end, where it never ran.

The same code also works unchanged in a small plugin or an mu-plugin.

Customise it

  • Keep Coupons out of the menu as well: delete the if ( function_exists( 'wc_coupons_enabled' ) ... ) block. The list is still at wp-admin/edit.php?post_type=shop_coupon.
  • Hide Marketing only for some users: return early from dpc_remove_wc_marketing_menu() when current_user_can( 'manage_options' ), so administrators still see it.

Gotchas

  • This hides the menu; it does not block the page. admin.php?page=wc-admin&path=/marketing still opens for anyone who knows the URL.
  • Extensions that add their own items to Marketing (email marketing, ads) lose that menu entry too. Open their settings from WooCommerce → Settings or the Extensions page.
  • Marketing tasks and tips on the WooCommerce Home screen are separate and stay.

In the Scripts Organizer library Import it with one click from Scripts Organizer.

// newsletter

Three tested WordPress snippets a week

Blocks, security, performance, Tailwind, PHP and React. Copy, paste, ship. You’ll also get DPlugins product updates. No spam, and you can unsubscribe anytime.

// newsletter

Three tested WordPress snippets a week

Blocks, security, performance, Tailwind, PHP and React. Copy, paste, ship. You'll also get DPlugins product updates. No spam, and you can unsubscribe anytime.