woocommerce_store_api_checkout_update_order_from_request хук-событиеWC 1.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.

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

Checkout::update_order_from_request()
woocommerce_store_api_checkout_update_order_from_request
woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/Checkout.php 457
do_action( 'woocommerce_store_api_checkout_update_order_from_request', $this->order, $request );

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

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