Automattic\WooCommerce\StoreApi\Schemas\V1

CheckoutSchema::get_item_responsepublicWC 1.0

Return the response for checkout.

Method of the class: CheckoutSchema{}

No Hooks.

Returns

Array.

Usage

$CheckoutSchema = new CheckoutSchema();
$CheckoutSchema->get_item_response( $item );
$item(object) (required)
Results from checkout action.

CheckoutSchema::get_item_response() code WC 10.3.6

public function get_item_response( $item ) {
	$cart           = property_exists( $item, 'cart' ) ? $item->cart : null;
	$payment_result = property_exists( $item, 'payment_result' ) ? $item->payment_result : null;
	return $this->get_checkout_response( $item->order, $payment_result, $cart );
}