woocommerce_email_attachments
Filter the attachments of the low stock notification email.
Usage
add_filter( 'woocommerce_email_attachments', 'wp_kama_woocommerce_email_attachments_filter', 10, 3 );
/**
* Function for `woocommerce_email_attachments` filter-hook.
*
* @param array $attachments The email attachments.
* @param WC_Product $product Product instance.
* @param $null
*
* @return array
*/
function wp_kama_woocommerce_email_attachments_filter( $attachments, $product, $null ){
// filter...
return $attachments;
}
- $attachments(array)
- The email attachments.
- $product(WC_Product)
- Product instance.
- $null
- -
Changelog
| Since 3.0.0 | Introduced. |
Where the hook is called
woocommerce_email_attachments
woocommerce_email_attachments
woocommerce_email_attachments
woocommerce_email_attachments
woocommerce/includes/class-wc-emails.php 1077
apply_filters( 'woocommerce_email_attachments', array(), 'low_stock', $product, null )
woocommerce/includes/emails/class-wc-email.php 720
return apply_filters( 'woocommerce_email_attachments', array(), $this->id, $this->object, $this );
woocommerce/includes/class-wc-emails.php 1164
apply_filters( 'woocommerce_email_attachments', array(), 'no_stock', $product, null )
woocommerce/includes/class-wc-emails.php 1250
apply_filters( 'woocommerce_email_attachments', array(), 'backorder', $args, null )