From f1b87bf5a1cd845ccc67ec28cae687df043d774b Mon Sep 17 00:00:00 2001 From: vendidero Date: Tue, 10 Sep 2024 13:18:20 +0200 Subject: [PATCH] Send order paid mail on pending to completed status transition (e.g. virtual items that do not need additional processing). --- includes/emails/class-wc-gzd-email-customer-paid-for-order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/emails/class-wc-gzd-email-customer-paid-for-order.php b/includes/emails/class-wc-gzd-email-customer-paid-for-order.php index b068cab00..e9dcf141a 100755 --- a/includes/emails/class-wc-gzd-email-customer-paid-for-order.php +++ b/includes/emails/class-wc-gzd-email-customer-paid-for-order.php @@ -34,6 +34,7 @@ public function __construct() { // Triggers for this email add_action( 'woocommerce_order_status_pending_to_processing_notification', array( $this, 'trigger' ), 30 ); + add_action( 'woocommerce_order_status_pending_to_completed_notification', array( $this, 'trigger' ), 30 ); add_action( 'woocommerce_order_status_failed_to_processing_notification', array( $this, 'trigger' ), 30 ); $this->placeholders = array( @@ -84,7 +85,6 @@ public function trigger( $order_id ) { $this->helper->setup_email_locale(); if ( $this->is_enabled() && $this->get_recipient() ) { - // Make sure gateways do not insert data here remove_all_actions( 'woocommerce_email_before_order_table' );