Automattic\WooCommerce\Internal\Admin\Orders

PageController::setup()publicWC 1.0

Sets up the page controller, including registering the menu item.

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

No Hooks.

Return

null. Nothing.

Usage

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

Code of PageController::setup() WC 7.1.0

public function setup(): void {
	$this->redirection_controller = new PostsRedirectionController( $this );

	// Register menu.
	if ( 'admin_menu' === current_action() ) {
		$this->register_menu();
	} else {
		add_action( 'admin_menu', 'register_menu', 9 );
	}

	$this->set_action();

	self::add_action( 'load-woocommerce_page_wc-orders', array( $this, 'handle_load_page_action' ) );
}