From eb57532740816f63d2d7351f2ba4155709734b72 Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Tue, 24 Dec 2019 12:09:50 -0300 Subject: [PATCH] Fixed number of filter args in WC_Emails --- includes/class-wc-emails.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index 927df243613..8d788128119 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -616,11 +616,11 @@ class WC_Emails { ); wp_mail( - apply_filters( 'woocommerce_email_recipient_low_stock', get_option( 'woocommerce_stock_email_recipient' ), $product ), - apply_filters( 'woocommerce_email_subject_low_stock', $subject, $product ), + apply_filters( 'woocommerce_email_recipient_low_stock', get_option( 'woocommerce_stock_email_recipient' ), $product, null ), + apply_filters( 'woocommerce_email_subject_low_stock', $subject, $product, null ), apply_filters( 'woocommerce_email_content_low_stock', $message, $product ), - apply_filters( 'woocommerce_email_headers', '', 'low_stock', $product ), - apply_filters( 'woocommerce_email_attachments', array(), 'low_stock', $product ) + apply_filters( 'woocommerce_email_headers', '', 'low_stock', $product, null ), + apply_filters( 'woocommerce_email_attachments', array(), 'low_stock', $product, null ) ); } @@ -639,11 +639,11 @@ class WC_Emails { $message = sprintf( __( '%s is out of stock.', 'woocommerce' ), html_entity_decode( wp_strip_all_tags( $product->get_formatted_name() ), ENT_QUOTES, get_bloginfo( 'charset' ) ) ); wp_mail( - apply_filters( 'woocommerce_email_recipient_no_stock', get_option( 'woocommerce_stock_email_recipient' ), $product ), - apply_filters( 'woocommerce_email_subject_no_stock', $subject, $product ), + apply_filters( 'woocommerce_email_recipient_no_stock', get_option( 'woocommerce_stock_email_recipient' ), $product, null ), + apply_filters( 'woocommerce_email_subject_no_stock', $subject, $product, null ), apply_filters( 'woocommerce_email_content_no_stock', $message, $product ), - apply_filters( 'woocommerce_email_headers', '', 'no_stock', $product ), - apply_filters( 'woocommerce_email_attachments', array(), 'no_stock', $product ) + apply_filters( 'woocommerce_email_headers', '', 'no_stock', $product, null ), + apply_filters( 'woocommerce_email_attachments', array(), 'no_stock', $product, null ) ); } @@ -677,11 +677,11 @@ class WC_Emails { $message = sprintf( __( '%1$s units of %2$s have been backordered in order #%3$s.', 'woocommerce' ), $args['quantity'], html_entity_decode( wp_strip_all_tags( $args['product']->get_formatted_name() ), ENT_QUOTES, get_bloginfo( 'charset' ) ), $order->get_order_number() ); wp_mail( - apply_filters( 'woocommerce_email_recipient_backorder', get_option( 'woocommerce_stock_email_recipient' ), $args ), - apply_filters( 'woocommerce_email_subject_backorder', $subject, $args ), + apply_filters( 'woocommerce_email_recipient_backorder', get_option( 'woocommerce_stock_email_recipient' ), $args, null ), + apply_filters( 'woocommerce_email_subject_backorder', $subject, $args, null ), apply_filters( 'woocommerce_email_content_backorder', $message, $args ), - apply_filters( 'woocommerce_email_headers', '', 'backorder', $args ), - apply_filters( 'woocommerce_email_attachments', array(), 'backorder', $args ) + apply_filters( 'woocommerce_email_headers', '', 'backorder', $args, null ), + apply_filters( 'woocommerce_email_attachments', array(), 'backorder', $args, null ) ); }