From e2881d5af136ec4474f35ec350fcbaf10022a253 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 5 Apr 2017 15:50:40 -0300 Subject: [PATCH] Ensure gateways are loaded in emails Fix missing bank details in emails closes #13966 --- includes/class-wc-emails.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index 294533233fd..7c41863bc0b 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -112,6 +112,11 @@ class WC_Emails { public static function send_queued_transactional_email( $filter = '', $args = array() ) { if ( apply_filters( 'woocommerce_allow_send_queued_transactional_email', true, $filter, $args ) ) { self::instance(); // Init self so emails exist. + + // Ensure gateways are loaded in case they need to insert data into the emails. + WC()->payment_gateways(); + WC()->shipping(); + do_action_ref_array( $filter . '_notification', $args ); } }