Ajout du Client aux destinataires des mails de commandes annulées
Dans functions.php ajouter (script non mis en place) :
/**
* Ajouter le destinataire « client » pour un mail de commande annulée
*/
add_filter( ‘woocommerce_email_recipient_cancelled_order’, ‘envoyer_commande_annulee_au_client’, 10, 2 );
function envoyer_commande_annulee_au_client( $recipient, $order ) {
if ( $order instanceof WC_Order ) {
$recipient .= ‘,’ . $order->get_billing_email(); // ajoute l’email du client
}
return $recipient;
}