Automattic\WooCommerce\Admin\Features\ProductDataViews
Init::woocommerce_add_new_products_dashboard()
Replaces the default posts menu item with the new posts dashboard.
Method of the class: Init{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Init = new Init(); $Init->woocommerce_add_new_products_dashboard();
Init::woocommerce_add_new_products_dashboard() Init::woocommerce add new products dashboard code WC 9.7.1
public function woocommerce_add_new_products_dashboard() { $gutenberg_experiments = get_option( 'gutenberg-experiments' ); if ( ! $gutenberg_experiments ) { return; } $ptype_obj = get_post_type_object( 'product' ); add_submenu_page( 'edit.php?post_type=product', $ptype_obj->labels->name, esc_html__( 'All Products ( new )', 'woocommerce' ), 'manage_woocommerce', 'woocommerce-products-dashboard', array( $this, 'woocommerce_products_dashboard' ), 1 ); }