Support » Plugin: WordPress Email Template Designer - WP HTML Mail » Woocommerce – Select email template based order type

  • Resolved coodeis


    We started using your plugin to get fancy woocommerce emails! The ecommerce I’m developing has two types of orders – regular ecommerce order and donation. We would need unique emails for the both. So when a user place ecommerce order the default order notifications are sent but when a user gives donation the system should send another notifications. So what is the best way to select email template to send? I’m really okay to do it programmatically. I don’t want any email template per product solution because our system is based on the order types.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,
    For this special use case I recommend creating your own template files in PHP. You can still use header, footer and styling from our plugin but for the content you should use your own code.
    You can follow this guide to override WooCommerce email templates
    When you have template files for your email in your theme our plugin detects these templates and gives you a new option to use them.
    Our WooCommerce email preview feature could be quite useful during development because you can try different orders in your preview.

    Thanks for your quick response Hannes! So it’s not an option to hook in order state change and programmatically trigger another email template sending based order type, isn’t it?

    Adding additional emails is far more work than just replacing the content of existing ones, so my recommendation is to keep WooCommerce workflows as they are and just change the content of the messages.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.