Automattic\WooCommerce\Internal\Utilities

COTMigrationUtil::get_order_admin_screen()publicWC 1.0

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

Method of the class: COTMigrationUtil{}

No Hooks.

Return

String.

Usage

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

COTMigrationUtil::get_order_admin_screen() code WC 8.7.0

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';
}