Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Last active October 30, 2023 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SiR-DanieL/3accbd0c31137d8c966a714ea32627e9 to your computer and use it in GitHub Desktop.
Save SiR-DanieL/3accbd0c31137d8c966a714ea32627e9 to your computer and use it in GitHub Desktop.
<?php
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 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment