woocommerce_ajax_add_order_item_meta

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

Paramètres

Entrée :
$item_id, $item, $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_add_order_item_meta'
add_action('woocommerce_ajax_add_order_item_meta', 'ma_fonction_personnalisee', 10, 1);

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

Actualités

Chargement des actualités...