Ensure gateways are loaded in emails

Fix missing bank details in emails

closes #13966
This commit is contained in:
Claudio Sanches 2017-04-05 15:50:40 -03:00
parent f250cac8d1
commit e2881d5af1
1 changed files with 5 additions and 0 deletions

View File

@ -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 );
}
}