WordPress at Your Fingertips
function is not described


Checkout::process_without_payment() private WC 1.0

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

{} It's a method of the class: Checkout{}

No Hooks.


null. Nothing.


// private - for code of main (parent) class only
$result = $this->process_without_payment( $request, $payment_result );
$request(WP_REST_Request) (required)
Request object.
$payment_result(PaymentResult) (required)
Payment result object.

Code of Checkout::process_without_payment() WC 5.8.0

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() );