Merge pull request #25312 from woocommerce/fix/25268

Fixed number of filter args in WC_Emails
This commit is contained in:
Vedanshu Jain 2019-12-26 16:59:17 +05:30 committed by GitHub
commit 842861005c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 12 deletions

View File

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