Help
Themes
 Print
WooCoupon - Change, replace and override email template

WooCoupon provide a powerful, “all-in-one” solution for gift cards, store credits, discount coupons, and vouchers extending the core functionality of WooCommerce coupons.

This doc article explains how you can change, replace and override the coupons’ email template.

All emails sent from WooCoupon, including the coupon code, are sent via existing templates (overridable) that are located in the ‘templates‘ directory of WooCoupon – /WooCoupons/templates/.

If you want to change or modify the content of an email or if you want to change the email layout, there are two ways to do it:

Apply change in the file (Upgrade-unsafe):

Open file ‘/WooCoupons/templates/email.php‘. Modify its content and style as needed. Note: This method is not recommended, as you’ll lose changes after updating WooCoupons to a newer version.

Use another template file (Upgrade-safe):

Use your own email template in place of the default one provided by WooCoupon. Copy the template into a directory named ‘woocommerce’ within your theme keeping the same file structure but removing the ‘templates’ subdirectory.

Here’s how:

  • Create a template file and keep the file name as: email.php. Other file names will not work.
  • Open your themes folder and check if you have a folder named woocommerce. If not, create a folder named woocommerce
  • Open woocommerce folder and create a new folder inside it. Keep the folder’s name as – woocoupons.
  • Place the file email.php inside woocommerce-smart-coupons. For example: To override the email template of the coupon’s email, copy: wp-content/plugins/WooCoupons/templates/email.php to wp-content/themes/yourtheme/woocommerce/woocoupons/email.php.

The copied file will now override the WooCommerce WooCoupons default template files.

WooCoupons will use your template file (if found) for all emails sent from WooCoupons.

You can follow this same method for these email templates of the WooCoupons plugin:

  1. combined-email.php – This email template is used when the setting under WooCommerce > Settings > WooCoupons > Combine emails is enabled.
  2. acknowledgement-email.php – This email template is used when an email is sent from the store to the purchaser of the coupon who has sent some coupons to someone else to acknowledge the purchaser of the coupons
Was this article helpful?