diff --git a/includes/class-woocommerce-filters.php b/includes/class-woocommerce-filters.php index adebb0b9..2135d430 100644 --- a/includes/class-woocommerce-filters.php +++ b/includes/class-woocommerce-filters.php @@ -165,7 +165,7 @@ public static function woographql_stripe_gateway_args( $gateway_args, $payment_m * the `WC_Email_Customer_Reset_Password` email is not enabled. */ public static function get_reset_password_message( $message, $key, $user_login ) { - $wc_reset_email = \WC()->mailer()->emails['WC_Email_Customer_Reset_Password']; + $wc_reset_email = \WC_Email_Customer_Reset_Password(); if ( $wc_reset_email && $wc_reset_email->is_enabled() ) { add_filter( 'wp_mail_content_type', [ $wc_reset_email, 'get_content_type' ] ); @@ -190,7 +190,7 @@ public static function get_reset_password_message( $message, $key, $user_login ) * the `WC_Email_Customer_Reset_Password` email is not enabled. */ public static function get_reset_password_title( $title ) { - $wc_reset_email = \WC()->mailer()->emails['WC_Email_Customer_Reset_Password']; + $wc_reset_email = \WC_Email_Customer_Reset_Password(); return $wc_reset_email->is_enabled() ? $wc_reset_email->get_subject() : $title; } }