woocommerce_ajax_order_items_added

ACTION woocommerce\includes\class-wc-ajax.php (ligne 1113) github
Add order item via AJAX. This is refactored for better unit testing.

Paramètres

Entrée :
$added_items, $order
Sortie :
@param int          $order_id     ID of order to add items to.
@param string|array $items        Existing items in order. Empty string if no items to add.
@param array        $items_to_add Array of items to add.
@return array     Fragments to render and notes HTML.

Utilisation

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

function ma_fonction_personnalisee($added_items, $order) {
    // Votre code ici
    error_log('Hook woocommerce_ajax_order_items_added déclenché');
}

Actualités

Chargement des actualités...