WordPress at Your Fingertips
function is not described

WC_Admin_Menus::menu_highlight() public WC 1.0

Highlights the correct top level admin menu item for post type add screens.

{} It's a method of the class: WC_Admin_Menus{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Admin_Menus = new WC_Admin_Menus();
$WC_Admin_Menus->menu_highlight();

Code of WC_Admin_Menus::menu_highlight() WC 5.9.0

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;
	}
}