Automattic\WooCommerce\StoreApi\Schemas\V1
CheckoutSchema::get_item_response
Return the response for checkout.
Метод класса: CheckoutSchema{}
Хуков нет.
Возвращает
array.
Использование
$CheckoutSchema = new CheckoutSchema(); $CheckoutSchema->get_item_response( $item );
- $item(объект) (обязательный)
- Results from checkout action.
Код CheckoutSchema::get_item_response() CheckoutSchema::get item response WC 11.2.2
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 );
}