WC_Admin_Menus::maybe_add_new_product_management_experience()
Maybe add new management product experience.
Method of the class: WC_Admin_Menus{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Admin_Menus = new WC_Admin_Menus(); $WC_Admin_Menus->maybe_add_new_product_management_experience();
WC_Admin_Menus::maybe_add_new_product_management_experience() WC Admin Menus::maybe add new product management experience code WC 9.7.1
public function maybe_add_new_product_management_experience() { if ( FeaturesUtil::feature_is_enabled( 'product_block_editor' ) ) { global $submenu; if ( isset( $submenu['edit.php?post_type=product'][10] ) ) { // Disable phpcs since we need to override submenu classes. // Note that `phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited` does not work to disable this check. // phpcs:disable $submenu['edit.php?post_type=product'][10][2] = 'admin.php?page=wc-admin&path=/add-product'; // phps:enableWordPress.Variables.GlobalVariables.OverrideProhibited } } }