WooCommerce: Hide “Thanks for shopping with us” @ Emails

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 Customer Completed Email: hiding the “Thanks for shopping with us.” greeting

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 CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    WooCommerce 4.6
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */ 

add_filter( 'gettext', 'bbloomer_translate_woocommerce_strings_emails', 999 );

function bbloomer_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;
}

Where to add custom code?

You should place PHP snippets at the bottom of your child theme functions.php file and CSS at the bottom of its style.css file. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my guide "Should I Add Custom Code Via WP Editor, FTP or Code Snippets?" and my video tutorial "Where to Place WooCommerce Customization?"

Does this snippet (still) work?

Please let me know in the comments if everything went as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting.

If you think this code saved you time & money, feel free to join 17,000+ WooCommerce Weekly subscribers for blog post updates and 250+ Business Bloomer supporters for 365 days of WooCommerce benefits. Thank you in advance!

Need Help with WooCommerce?

Check out these free video tutorials. You can learn how to customize WooCommerce without unnecessary plugins, how to properly configure the WooCommerce plugin settings and even how to master WooCommerce troubleshooting in case of a bug!

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza.

8 thoughts on “WooCommerce: Hide “Thanks for shopping with us” @ Emails

  1. Hi, I’m just curious. Are your instructions to to EITHER remove “Thanks for shopping with us.” from the Additional Content section of the dashboard or use the snippet, or is it necessary to do both? The reason I ask is because I removed it from the Additional Content field in the dashboard and it still appears in my emails and I’m perplexed as to why Woocommerce would hard code this in our emails if that field is blank. A quick and dirty method that should also work is just to add   to the Additional Content field.

    1. Maybe a bug? Not fully sure. I tend to use code for everything, even changing the settings!

  2. Hi there,

    Does anyone know how do I hide the supplier name from my customer’s email? I’ve purchased the dropshipping paid plug-in from Woo a few months ago however every time I send emails to my customers either notes or purchasing completed via Woo the information of my supplier is on the body of that email as part of the description of that order.

    I will appreciate it if somebody can help me with that.

    I can’t provide a link, but I can show you a screenshot of what the customers seeing on their emails.

    Thanks for your time!

    F

    1. Hey Felipe, did you ask the plugin developer?

  3. I just tested this snippet, and it’s not working for me. Does it need updating?

    1. Not really, as gettext is a WordPress function. Are you translating the correct, full, complete strings?

  4. Hi Rodolfo,

    Thanks for this. Couple of queries.

    1. I read somewhere that gettext is very resource intensive. Please share some thoughts on this. Will the above code make everything slow?
    2. This code seems to look for the phrase everywhere. Is there something that can be added to restrict this translation to specific emails?

    Thanks

    1. It’s fine if not used too much 🙂 Also, you can pass the “textdomain” to the gettext function and e.g. only look for “woocommerce” strings. Hope this helps

Questions? Feedback? Support? Leave your Comment Now!
_____

If you are writing code, please wrap it between shortcodes: [php]code_here[/php]. Failure to complying with this (as well as going off topic, not writing in English, etc.) will result in comment deletion. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining BloomerArmada to get blog comment reply priority, ask me 1-to-1 WooCommerce questions and enjoy many more perks. Thank you :)

Your email address will not be published. Required fields are marked *