From 8cb0e42551a79bfb03d81d5248fe3d13ba7b9d97 Mon Sep 17 00:00:00 2001 From: mindmantra Date: Thu, 14 Mar 2019 12:13:55 +0530 Subject: [PATCH] Add $this context to woocommerce_email_styles filter. see: #23026 --- includes/emails/class-wc-email.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/emails/class-wc-email.php b/includes/emails/class-wc-email.php index 5df49e22b27..7092ddc8da9 100644 --- a/includes/emails/class-wc-email.php +++ b/includes/emails/class-wc-email.php @@ -523,7 +523,7 @@ class WC_Email extends WC_Settings_API { if ( in_array( $this->get_content_type(), array( 'text/html', 'multipart/alternative' ), true ) ) { ob_start(); wc_get_template( 'emails/email-styles.php' ); - $css = apply_filters( 'woocommerce_email_styles', ob_get_clean() ); + $css = apply_filters( 'woocommerce_email_styles', ob_get_clean(), $this ); if ( $this->supports_emogrifier() ) { if ( ! class_exists( 'Emogrifier' ) ) {