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 object.
Full details about the request.

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

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

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

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

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

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