woocommerce_store_api_checkout_update_order_from_request хук-событиеWC 7.2.0

Fires when the Checkout Block/Store API updates an order's from the API request data.

This hook gives extensions the chance to update orders based on the data in the request. This can be used in conjunction with the ExtendSchema class to post custom data and then process it.

Использование

add_action( 'woocommerce_store_api_checkout_update_order_from_request', 'wp_kama_woocommerce_store_api_checkout_update_order_from_request_action', 10, 2 );

/**
 * Function for `woocommerce_store_api_checkout_update_order_from_request` action-hook.
 * 
 * @param \WC_Order        $order   Order object.
 * @param \WP_REST_Request $request Full details about the request.
 *
 * @return void
 */
function wp_kama_woocommerce_store_api_checkout_update_order_from_request_action( $order, $request ){

	// action...
}
$order(\WC_Order)
Order object.
$request(\WP_REST_Request)
Full details about the request.

Список изменений

С версии 7.2.0 Введена.

Где вызывается хук

В файле: /src/StoreApi/Utilities/CheckoutTrait.php
woocommerce_store_api_checkout_update_order_from_request
woocommerce/src/StoreApi/Utilities/CheckoutTrait.php 168
do_action( 'woocommerce_store_api_checkout_update_order_from_request', $this->order, $request );

Где используется хук в WooCommerce

Использование не найдено.