woocommerce_store_api_checkout_order_processed

ACTION woocommerce\src\StoreApi\Routes\V1\CheckoutOrder.php (ligne 158) github
Fires before an order is processed by the Checkout Block/Store API. This hook informs extensions that $order has completed processing and is ready for payment. This is similar to existing core hook woocommerce_checkout_order_processed. We're using a new action: - To keep the interface focused (only pass $order, not passing request data). - This also explicitly indicates these orders are from checkout block/StoreAPI.

Paramètres

Entrée :
$this->order
Sortie :
@param \WC_Order $order Order object.

Utilisation

// Ajouter une fonction au hook action 'woocommerce_store_api_checkout_order_processed'
add_action('woocommerce_store_api_checkout_order_processed', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($this->order) {
    // Votre code ici
    error_log('Hook woocommerce_store_api_checkout_order_processed déclenché');
}

Actualités

Chargement des actualités...