Merge pull request #5469 from claudiosmweb/normalize-woocommerce_email_attachments-filter-type

Normalize the woocommerce_email_attachments filter return type
This commit is contained in:
Mike Jolley 2014-05-13 14:34:03 +01:00
commit 77e5574b97
1 changed files with 3 additions and 3 deletions

View File

@ -343,7 +343,7 @@ class WC_Emails {
$headers = apply_filters('woocommerce_email_headers', '', 'low_stock', $product);
// Attachments
$attachments = apply_filters('woocommerce_email_attachments', '', 'low_stock', $product);
$attachments = apply_filters('woocommerce_email_attachments', array(), 'low_stock', $product);
// Send the mail
wp_mail( get_option('woocommerce_stock_email_recipient'), $subject, $message, $headers, $attachments );
@ -375,7 +375,7 @@ class WC_Emails {
$headers = apply_filters('woocommerce_email_headers', '', 'no_stock', $product);
// Attachments
$attachments = apply_filters('woocommerce_email_attachments', '', 'no_stock', $product);
$attachments = apply_filters('woocommerce_email_attachments', array(), 'no_stock', $product);
// Send the mail
wp_mail( get_option('woocommerce_stock_email_recipient'), $subject, $message, $headers, $attachments );
@ -420,7 +420,7 @@ class WC_Emails {
$headers = apply_filters('woocommerce_email_headers', '', 'backorder', $args);
// Attachments
$attachments = apply_filters('woocommerce_email_attachments', '', 'backorder', $args);
$attachments = apply_filters('woocommerce_email_attachments', array(), 'backorder', $args);
// Send the mail
wp_mail( get_option('woocommerce_stock_email_recipient'), $subject, $message, $headers, $attachments );