WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Routes

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.

Return

null. Nothing.

Usage

// 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' );
	$this->order->payment_complete();

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