Admin custom submenu element and current link css

Question

I try to add a link in my woocommerce admin menu, this way manager can go directly to the "processing" orders part

I manage to do it with the help of this function i created

add_action( 'admin_menu', 'wp_dashboard_orders_processing', 9999 );
 
function wp_dashboard_orders_processing() {

   add_submenu_page( 'woocommerce', 'commande en cours', 'commande en cours', 'edit_products', '/edit.php?post_status=wc-processing&post_type=shop_order', '', 1 );
}

It’s partially working as it doesn’t highlight the menu item "commande en cours". It don’t add the "current" pseudo class to the link and keep highlight the "order" menu item instead.

Please see attach image

enter image description here

Thank you for your help, i am nearly there

0
user1492189 3 months 0 Answers 9 views 0

Leave an answer