Refund admin email
-
Hello there!
I have found that the refund status change sends an email to the same email that are written on Cancelled order, New order and Failed Order.
But there isn’t a template for that.
I have installed a plugin that has this piece of code so that the customer can receive the same failed and canceled email:
function send_email_to_customer_on_cancelled_order_in_woocommerce() { load_plugin_textdomain( 'send-email-to-customer-on-cancelled-order-in-woocommerce', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' ); } add_action( 'plugins_loaded', 'send_email_to_customer_on_cancelled_order_in_woocommerce' ); add_action('woocommerce_order_status_changed', 'seccow_send_email', 10, 4 ); function seccow_send_email( $order_id, $old_status, $new_status, $order ){ if ( $new_status == 'cancelled' || $new_status == 'failed' ){ $wc_emails = WC()->mailer()->get_emails(); // Obtener todas las instancias de WC_emails $email_cliente = $order->get_billing_email(); // Email del cliente } if ( $new_status == 'cancelled' ) { // Cambiar el destinatario de la instancia $wc_emails['WC_Email_Cancelled_Order']->recipient .= ',' . $email_cliente; // Enviar email desde la instancia $wc_emails['WC_Email_Cancelled_Order']->trigger( $order_id ); } elseif ( $new_status == 'failed' ) { // Cambiar el destinatario de la instancia $wc_emails['WC_Email_Failed_Order']->recipient .= ',' . $email_cliente; // Enviar email desde la instancia $wc_emails['WC_Email_Failed_Order']->trigger( $order_id ); } }However there is nothing here that listens to the refund status change.
Is there something I’m missing?
Thanks in advance!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Refund admin email’ is closed to new replies.