62
WooCommerce emails come with the following hard-coded (argh!) greetings: ‘Thanks for shopping with us.‘, ‘Thanks for reading.‘, ‘We look forward to seeing you soon.‘, ‘We look forward to fulfilling your order soon.‘, ‘Thanks!‘, ‘We hope to see you again soon.‘ based on the specific email.
While having these greetings in the WooCommerce customer email footer may look nice and friendly, you should have the freedom to remove or edit them.
So, you have two choices: doing that via the email settings, or by “translating” those strings via PHP. Enjoy!
WooCommerce Options: Edit or Remove “Thanks for shopping with us.” and other greetings @ WooCommerce Customer Order Emails
Just go to WooCommerce > Settings > Emails and open a given email, then delete or change the “Additional Content” input field value:
PHP Snippet: Hide “Thanks for shopping with us.” and other greetings @ WooCommerce Customer Order Emails
/**
* @snippet Hide Greetings @ WooCommerce Emails
* @how-to Get tutoraspire.com FREE
* @author Tutor Aspire
* @compatible WooCommerce 4.6
* @donate $9 https://tutoraspire.com
*/
add_filter( 'gettext', 'tutoraspire_translate_woocommerce_strings_emails', 999 );
function tutoraspire_translate_woocommerce_strings_emails( $translated ) {
// Get strings and translate them into empty strings
$translated = str_ireplace( 'Thanks for shopping with us.', '', $translated );
$translated = str_ireplace( 'We hope to see you again soon.', '', $translated );
return $translated;
}