woocommerce_store_api_cart_update_customer_from_request
Fires when the Checkout Block/Store API updates a customer from the API request data.
Использование
add_action( 'woocommerce_store_api_cart_update_customer_from_request', 'wp_kama_woocommerce_store_api_cart_update_customer_from_request_action', 10, 2 ); /** * Function for `woocommerce_store_api_cart_update_customer_from_request` action-hook. * * @param \WC_Customer $customer Customer object. * @param \WP_REST_Request $request Full details about the request. * * @return void */ function wp_kama_woocommerce_store_api_cart_update_customer_from_request_action( $customer, $request ){ // action... }
- $customer(\WC_Customer)
- Customer object.
- $request(\WP_REST_Request)
- Full details about the request.
Список изменений
С версии 7.2.0 | Введена. |
Где вызывается хук
woocommerce_store_api_cart_update_customer_from_request
woocommerce/src/StoreApi/Routes/V1/CartUpdateCustomer.php 226
do_action( 'woocommerce_store_api_cart_update_customer_from_request', $customer, $request );