Setting up Conditional Emails

Once the  Conditional Emails extension is installed and activated, a new section will be added to the Downloads > Settings > Emails tab entitled "Conditional Emails". Prior to any configuration, the Conditional Emails section will look like this:

Clicking the "Add Email" button will display a dialog allowing you to enter the status conditions, as well as the Email Subject and Email Message. At this time, the only conditions available are based on a change in the status of a purchase. In other words, selecting "Pending" for Status - Changed From and "Complete" for Status - Changed To will send an email to the purchaser whenever a purchase changes from "Pending" to "Complete".

Writing Your First Email

Writing emails with the Conditional Emails extension works in much the same way as writing emails for EDD itself. HTML emails are permitted, and Conditional Emails supports a number of template tags to help you out. The following template tags are supported natively:

{download_list} - A list of download links for each download purchased
{file_urls} - A plain-text list of download URLs for each download purchased
{name} - The buyer's first name
{fullname} - The buyer's full name, first and last
{username} - The buyer's user name on the site, if they registered an account
{user_email} - The buyer's email address
{billing_address} - The buyer's billing address
{date} - The date of the purchase
{subtotal} - The price of the purchase before taxes
{tax} - The taxed amount of the purchase
{price} - The total price of the purchase
{payment_id} - The unique ID number for this purchase
{receipt_id} - The unique ID number for this purchase receipt
{payment_method} - The method of payment used for this purchase
{sitename} - Your site name
{receipt_link} - Adds a link so users can view their receipt directly on your website if they are unable to view it in the browser correctly.
{discount_codes} - Adds a list of any discount codes applied to this purchase

In addition to these template tags, Conditional Emails uses the EDD core template tag system, so tags added by third-party extensions should work as well.

Alternative solution

Conditional Emails makes it easy to configure unique emails which are triggered based on changing payment statuses. However, there may be cases in which more functionality is needed such as reporting, email automations, custom campaigns, abandoned cart recovery, additional conditions, and more. In those cases, we recommend looking at Jilt which you can learn more about here.