Merge pull request #8453 from corsonr/low_stock_email_tweak

Add product stock in low stock email notification
This commit is contained in:
Mike Jolley 2015-06-29 12:22:29 +02:00
commit eae15e9d72
1 changed files with 1 additions and 1 deletions

View File

@ -392,7 +392,7 @@ class WC_Emails {
*/
public function low_stock( $product ) {
$subject = sprintf( '[%s] %s', $this->get_blogname(), __( 'Product low in stock', 'woocommerce' ) );
$message = sprintf( __( '%s is low in stock.', 'woocommerce' ), html_entity_decode( strip_tags( $product->get_formatted_name() ) ) );
$message = sprintf( __( '%s is low in stock.', 'woocommerce' ), html_entity_decode( strip_tags( $product->get_formatted_name() ) ) ) . ' ' . sprintf( __( 'There are %d left', 'woocommerce' ), html_entity_decode( strip_tags( $product->get_total_stock() ) ) );
wp_mail(
apply_filters( 'woocommerce_email_recipient_low_stock', get_option( 'woocommerce_stock_email_recipient' ), $product ),