Automattic\WooCommerce\Utilities

OrderUtil::is_order_edit_screen()public staticWC 1.0

Check if the current admin screen is for editing an order.

Method of the class: OrderUtil{}

No Hooks.

Return

true|false.

Usage

$result = OrderUtil::is_order_edit_screen( $order_type ) : bool;
$order_type(string)
The order type to check for.
Default: shop_order

OrderUtil::is_order_edit_screen() code WC 9.0.1

public static function is_order_edit_screen( $order_type = 'shop_order' ) : bool {
	return wc_get_container()->get( PageController::class )->is_order_screen( $order_type, 'edit' );
}