Automattic\WooCommerce\Utilities
OrderUtil::is_new_order_screen
Check if the current admin screen is adding a new order.
Метод класса: OrderUtil{}
Хуков нет.
Возвращает
true|false.
Использование
$result = OrderUtil::is_new_order_screen( $order_type ): bool;
- $order_type(строка)
- The order type to check for.
По умолчанию: shop_order
Код OrderUtil::is_new_order_screen() OrderUtil::is new order screen WC 10.4.0
public static function is_new_order_screen( $order_type = 'shop_order' ): bool {
return wc_get_container()->get( PageController::class )->is_order_screen( $order_type, 'new' );
}