Action to trigger sending a custom order email template from a REST API request. The email template must first be made available for the associated order. See the `woocommerce_rest_order_actions_email_valid_template_classes` filter hook.
$order->get_id(
Sortie :
@param int $order_id The ID of the order. @param string $template_id The ID of the template specified in the API request.
// Ajouter une fonction au hook action 'woocommerce_rest_order_actions_email_send'
add_action('woocommerce_rest_order_actions_email_send', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($order->get_id() {
// Votre code ici
error_log('Hook woocommerce_rest_order_actions_email_send déclenché');
}
Chargement des actualités...