Using the most recent version of WooCommerce, there’s a “Home” section that I cannot remove using any built in setting.
I have managed to remove the analytics and marketing option, but how do I remove the “Home” option and that way, make it like it always was before — an overview of all orders?
add_filter( 'woocommerce_admin_get_feature_config', 'remove_wc_marketing_menu_option', 10, 1 ); function remove_wc_marketing_menu_option($feature_config){ $feature_config['marketing'] = false; $feature_config['analytics'] = false; return $feature_config; }
Advertisement
Answer
You could use remove_submenu_page
function action_admin_menu() { // Contains the URI of the current page. $current_url = $_SERVER['REQUEST_URI']; // Make sure wc-admin / customers page will still work if ( strpos( $current_url, 'customers' ) == false) { remove_submenu_page( 'woocommerce', 'wc-admin' ); } } add_action( 'admin_menu', 'action_admin_menu', 99, 0 );
Related: