WC_Admin_Menus::menu_highlight()
Highlights the correct top level admin menu item for post type add screens.
Description Description
Source Source
File: includes/admin/class-wc-admin-menus.php
public function menu_highlight() { global $parent_file, $submenu_file, $post_type; switch ( $post_type ) { case 'shop_order': case 'shop_coupon': $parent_file = 'woocommerce'; // WPCS: override ok. break; case 'product': $screen = get_current_screen(); if ( $screen && taxonomy_is_product_attribute( $screen->taxonomy ) ) { $submenu_file = 'product_attributes'; // WPCS: override ok. $parent_file = 'edit.php?post_type=product'; // WPCS: override ok. } break; } }