Automattic\WooCommerce\Internal\Admin\Orders

PageController::register_menu()publicWC 1.0

Registers the "Orders" menu.

{} Это метод класса: PageController{}

Хуков нет.

Возвращает

null. Ничего.

Использование

$PageController = new PageController();
$PageController->register_menu(): void;

Код PageController::register_menu() WC 6.9.4

public function register_menu(): void {
	add_submenu_page(
		'woocommerce',
		__( 'Orders', 'woocommerce' ),
		__( 'Orders', 'woocommerce' ),
		'edit_others_shop_orders',
		'wc-orders',
		array( $this, 'output' )
	);

	// In some cases (such as if the authoritative order store was changed earlier in the current request) we
	// need an extra step to remove the menu entry for the menu post type.
	add_action(
		'admin_init',
		function() {
			remove_submenu_page( 'woocommerce', 'edit.php?post_type=shop_order' );
		}
	);
}