Automattic\WooCommerce\Internal\StockNotifications\Admin

MenusController::add_menupublicWC 1.0

Add Stock Notifications menu item.

Method of the class: MenusController{}

No Hooks.

Returns

true|false|null.

Usage

$MenusController = new MenusController();
$MenusController->add_menu();

MenusController::add_menu() code WC 10.3.6

public function add_menu() {

	if ( ! current_user_can( 'manage_woocommerce' ) ) {
		return false;
	}

	$dashboard_page = add_submenu_page(
		'woocommerce',
		__( 'Stock Notifications', 'woocommerce' ),
		__( 'Notifications', 'woocommerce' ),
		'manage_woocommerce',
		'wc-customer-stock-notifications',
		array( $this, 'notifications_page' )
	);

	add_action( "load-$dashboard_page", array( $this, 'add_screen_options' ) );
}