woocommerce_email_content_low_stock
Filter the content of the low stock notification email.
Usage
add_filter( 'woocommerce_email_content_low_stock', 'wp_kama_woocommerce_email_content_low_stock_filter', 10, 2 );
/**
* Function for `woocommerce_email_content_low_stock` filter-hook.
*
* @param string $message The email content.
* @param WC_Product $product Product instance.
*
* @return string
*/
function wp_kama_woocommerce_email_content_low_stock_filter( $message, $product ){
// filter...
return $message;
}
- $message(string)
- The email content.
- $product(WC_Product)
- Product instance.
Changelog
| Since 3.0.0 | Introduced. |
Where the hook is called
woocommerce_email_content_low_stock
woocommerce/includes/class-wc-emails.php 1015
apply_filters( 'woocommerce_email_content_low_stock', $message, $product ),