Checkout::process_without_payment()privateWC 1.0

For orders which do not require payment, just update status.

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

Хуков нет.


null. Ничего.


// private - только в коде основоного (родительского) класса
$result = $this->process_without_payment( $request, $payment_result );
$request(\WP_REST_Request) (обязательный)
Request object.
$payment_result(PaymentResult) (обязательный)
Payment result object.

Код Checkout::process_without_payment() WC 7.5.1

private function process_without_payment( \WP_REST_Request $request, PaymentResult $payment_result ) {
	// Transition the order to pending, and then completed. This ensures transactional emails fire for pending_to_complete events.
	$this->order->update_status( 'pending' );

	// Mark the payment as successful.
	$payment_result->set_status( 'success' );
	$payment_result->set_redirect_url( $this->order->get_checkout_order_received_url() );