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.
$this->order, $request
Sortie :
@param \WC_Order $order Order object. @param \WP_REST_Request $request Full details about the request.
// Ajouter une fonction au hook action 'woocommerce_store_api_checkout_update_order_from_request'
add_action('woocommerce_store_api_checkout_update_order_from_request', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($this->order, $request) {
// Votre code ici
error_log('Hook woocommerce_store_api_checkout_update_order_from_request déclenché');
}
Chargement des actualités...