woocommerce_rest_insert_order_note

ACTION woocommerce\includes\rest-api\Controllers\Version3\class-wc-rest-order-notes-controller.php (ligne 99) github
Fires after a order note is created or updated via the REST API.

Paramètres

Entrée :
$note, $request, true
Sortie :
@param WP_Comment      $note      New order note object.
@param WP_REST_Request $request   Request object.
@param boolean         $creating  True when creating item, false when updating.

Utilisation

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

function ma_fonction_personnalisee($note, $request, true) {
    // Votre code ici
    error_log('Hook woocommerce_rest_insert_order_note déclenché');
}

Actualités

Chargement des actualités...