Joey Ricketts

Customizing WooCommerce Related Emails

Customizing WooCommerce related emails may be something you’d like to do within your site, but just don’t know how to. The aim of this post is to help you gain a better sense of the ‘How-To’ of customizing these email templates. (also to show how easy it can actually be)

Due to the nature of my normal work, I will be customizing a WooCommerce Subscriptions related email, specifically the customer-payment-retry.php template.

It’s important to not modify these templates directly in the plugin folder. Doing this will result in all of your changes being overwritten when updates are performed. I will be displaying how to modify these templates without modifying the default templates in the plugin folders.

Step 1: Find the email template that you’d like to customize in your WooCommerce settings.
The specific path is: WooCommerce > Settings > Emails
Once there, click ‘Copy file to theme’.

email settings

Step 2: The template that you’re wanting to modify has now been saved to your theme, so what next? For this next step, you’ll want to access your site’s files via FTP or cPanel, whichever you feel most comfortable with.

If you’re wanting to access via FTP, you can use a client such as FileZilla. cPanel is typically included with your hosting account, but should be used with an equal amount of caution. Specific questions regarding cPanel should be directed to your hosting provider’s support team.

Step 3: Locate the newly copied email template in your theme’s folder. For instance, when using the Storefront theme, this file path would be: /wp-content/themes/storefront/woocommerce/emails/customer-payment-retry.php

file path in code editor

Step 4: Once located, you can then begin your customization process. Any changes to this file will directly change the email template that is sent out to do that specified action, which in this case would be sent to a customer when an attempt to automatically process a subscription renewal payment has failed and a retry rule has been applied to retry the payment in the future.

Save your changes and then you can start your normal testing process!

showing overridden email template

I hope this has been helpful, but please let me know if you have any questions!

Next Post

Previous Post

Leave a Reply

© 2019 Joey Ricketts

Theme by Anders Norén