Automattic\WooCommerce\Internal\Utilities

COTMigrationUtil::get_order_admin_screen()publicWC 1.0

Helper function to get screen name of orders page in wp-admin.

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

Хуков нет.

Возвращает

Строку.

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

$COTMigrationUtil = new COTMigrationUtil();
$COTMigrationUtil->get_order_admin_screen() : string;

Код COTMigrationUtil::get_order_admin_screen() WC 9.3.3

public function get_order_admin_screen() : string {
	if ( ! is_admin() ) {
		throw new \Exception( 'This function should only be called in admin.' );
	}
	return $this->custom_orders_table_usage_is_enabled() && function_exists( 'wc_get_page_screen_id' )
		? wc_get_page_screen_id( 'shop-order' )
		: 'shop_order';
}