woocommerce_order_partially_refunded

ACTION woocommerce\includes\wc-order-functions.php (ligne 713) github
Trigger notification emails. Filter hook to modify the partially-refunded status conditions.
traduction française
Déclencher des courriels de notification. Crochet de filtrage pour modifier les conditions de l'état de remboursement partiel.

Paramètres

Entrée :
$order->get_id(
Sortie :
@param bool $is_partially_refunded Whether the order is partially refunded.
@param int  $order_id The order id.
@param int  $refund_id The refund id.

Utilisation

Action lors d'un remboursement partiel

Gérer les remboursements partiels de commande

order-flow
// Action après remboursement partiel
add_action('woocommerce_order_partially_refunded', 'apres_remboursement_partiel', 10, 2);

function apres_remboursement_partiel($order_id, $refund_id) {
    $order = wc_get_order($order_id);
    $refund = wc_get_order($refund_id);
    
    $montant_rembourse = abs($refund->get_amount());
    
    // Logger pour comptabilité
    error_log("Remboursement partiel de {$montant_rembourse}€ sur commande #{$order_id}");
}

Actualités

Chargement des actualités...