Conditional Email Tags for Easy Digital Downloads lets you add smart, dynamic content to your EDD email templates using simple {if ...}{/if} tags. Personalize your customer emails based on payment gateway, order price, user role, and more!
Examples:
– {if gateway="stripe"}This is only for Stripe payments.{/if}
– {if gateway="paypal" price=">50"}PayPal and price over $50!{/if}
– {if user_role="subscriber"}Hello, valued subscriber!{/if}
– {if tax=">10"}This order has significant tax.{/if}
– {if discount_codes="SUMMER20"}Special summer discount applied!{/if}
Why use this plugin?
– 🧠 Make your emails smarter and more relevant
– 🛒 Target messages by payment method or order value
– 👤 Personalize content for different user roles
– 🔌 Easily extensible for developers
– More to come!
Usage
Add conditional blocks to your EDD email templates. Here are working examples for all available conditions:
1. By Gateway
-
Only for Stripe payments:
{if gateway=」stripe」}This is only for Stripe payments.{/if} -
Only for PayPal payments:
{if gateway=」paypal」}This is only for PayPal payments.{/if}
2. By Price
-
Order total greater than $50:
{if price=」>50″}Shown if order total is greater than $50.{/if} -
Order total less than or equal to $20:
{if price=」<=20″}Shown if order total is $20 or less.{/if} -
Order total exactly $100:
{if price=」100″}Shown if order total is exactly $100.{/if}
3. By Tax
-
Order tax greater than $10:
{if tax=」>10″}This order has significant tax.{/if} -
Tax-free purchase:
{if tax=」0″}Tax-free purchase!{/if}
4. By Discount Codes
-
Specific discount code applied:
{if discount_codes=」SUMMER20″}Special summer discount applied!{/if} -
No discount applied:
{if discount_codes=」」}No discount applied.{/if}
5. By User Role
-
For subscribers:
{if user_role=」subscriber」}Hello, valued subscriber!{/if} -
For customers with the 『administrator』 role:
{if user_role=」administrator」}Special message for admins.{/if}
6. Multiple Conditions
-
PayPal and order is $100 or more:
{if gateway=」paypal」 price=」>=100″}PayPal and order is $100 or more!{/if} -
Stripe and user is a subscriber:
{if gateway=」stripe」 user_role=」subscriber」}Stripe payment from a subscriber!{/if} -
High-value order with tax:
{if price=」>100″ tax=」>10″}High-value order with significant tax.{/if}
Conditional Content Blocks
You can show or hide content in your emails based on order or user properties using {if …} blocks.
Basic usage
{if gateway="stripe"}
Thank you for paying with Stripe!
{/if}Multiple conditions (AND/OR)
{if gateway="stripe" OR gateway="paypal"}
Thank you for using an online payment method!
{/if}
{if user_role="administrator" AND gateway="stripe"}
Special admin Stripe message!
{/if}
- Use AND to require all conditions to be true.
- Use OR to require at least one condition to be true.
- You can mix and match as needed:
{if gateway=」stripe」 OR gateway=」paypal」 AND user_role=」customer」}
Supported Operators
- AND, OR (logical operators): {if gateway=」stripe」 OR gateway=」paypal」}
Credits
Developed by Mihai Joldis
License
This plugin is licensed under the GPLv2 or later.






