I want to remove a few sub menu items from the admin menu in WordPress. I have found the following which can remove certain sub menu items...
add_action( 'admin_menu', 'adjust_the_wp_menu', 999 );
function adjust_the_wp_menu() {
$page = remove_submenu_page( 'themes.php', 'widgets.php' );
}
...but what if it is not a standard php such as "themes.php?page=custom-header" that I would like removed.
This worked for me. Thanks to Ravi for pointing me in the right direction.
I would like to share, that's how you can remove woocommerce submenu's
--