add_filter( 'woocommerce_email_subject_low_stock', 'wc_custom_low_stock_subject', 20, 2 ); | |
function wc_custom_low_stock_subject( $subject, $product ) { | |
return str_replace( 'Product', $product->get_name(), $subject ) . sprintf( __( ' - only %d left', 'domain' ), $product->get_stock_quantity() ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment