WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Automattic\WooCommerce\Blocks\StoreApi\Utilities

OrderController::validate_order_before_payment() public WC 1.0

Final validation ran before payment is taken.

By this point we have an order populated with customer data and items.

{} Это метод класса: OrderController{}

Хуков нет.

Возвращает

null. Ничего.

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

$OrderController = new OrderController();
$OrderController->validate_order_before_payment( $order );
$order(\WC_Order) (обязательный)
Order object.

Код OrderController::validate_order_before_payment() WC 6.1.1

public function validate_order_before_payment( \WC_Order $order ) {
	$needs_shipping          = wc()->cart->needs_shipping();
	$chosen_shipping_methods = wc()->session->get( 'chosen_shipping_methods' );

	$this->validate_coupons( $order );
	$this->validate_email( $order );
	$this->validate_selected_shipping_methods( $needs_shipping, $chosen_shipping_methods );
	$this->validate_addresses( $order );
}