Custom Emails for WooCommerce plugin lets you add fully customizable emails to WooCommerce. Custom emails are sent to the recipient list when selected triggers are called. Order emails can also be sent manually, via “Order actions” meta box.
Table of Contents
Settings
General Options
General settings are located in “WooCommerce > Settings > Custom Emails”.
- Number of emails
- Sets total number of custom emails you wish to add.
- Default:
1
- Default:
- Admin title #N
- Sets admin title for each custom email.
- Default:
Custom email
- Default:
Email Options
Settings for each custom email are located in “WooCommerce > Settings > Emails > Custom email #N”.
- Enable/Disable
- Enables/disables current email.
- Default:
yes
- Default:
- Trigger(s)
- Custom emails are automatically sent to the recipient list when selected triggers are called. You can set triggers here.
- Default: None
- Delay
- Optionally delay the email, e.g. by one week after order was completed. Ignored if set to zero.
- Default:
0
- Default:
- Delay unit
- Possible values: seconds; minutes; hours; days; weeks.
- Default:
seconds
- Default:
- Require order product(s)
- Email will be sent only if there is at least one of the selected products in the order. Option is ignored for non-order emails or if the option is empty.
- Default: None
- Exclude order product(s)
- Email will not be sent if there is at least one of the selected products in the order. Option is ignored for non-order emails or if the option is empty.
- Default: None
- Minimum order amount
- Minimum order amount (subtotal) for email to be sent. Option is ignored for non-order emails or if the option is empty.
- Default: None
- Maximum order amount
- Maximum order amount (subtotal) for email to be sent. Option is ignored for non-order emails or if the option is empty.
- Default: None
- Recipient(s)
- Enter recipients (comma separated) for this email. Defaults to admin email. Use
{customer}
for customer billing email.- Default: None
- Subject
- You can use shortcodes and/or standard placeholders here.
- Default:
[{site_title}] Order ({order_number}) - {order_date}
- Email type
- Choose which format of email to send. Possible values: Plain text; HTML; Multipart.
- Default:
HTML
- Default:
- WC email template
- Wraps email content in WooCommerce email template.
- Default:
yes
- Default:
- Email heading
- Used only if “WC email template” option is enabled and only for “HTML” email type. You can use shortcodes and/or standard placeholders here.
- Default:
Order {order_number}
- Default:
- Email content
- Please make sure content is not empty. You can use shortcodes and/or standard placeholders here.
- Default:
[order_details]</pre> <table> <tbody> <tr> <th>Billing address</th> <th>Shipping address</th> </tr> <tr> <td>[order_billing_address]</td> <td>[order_shipping_address]</td> </tr> </tbody> </table> <p>
You can also send emails manually, from “Order actions” meta box on order’s admin edit page:
Also you can use “Bulk actions” (on the “Orders” admin page) to send custom emails manually and in bulk:
Placeholders
To make it consistent with standard WooCommerce emails, you can also use standard placeholders:
{site_title}
{site_address}
{order_number}
{order_date}
Triggers
Available triggers:
- New order (Any status)
- New order (Pending payment)
- New order (Processing)
- New order (On hold)
- New order (Completed)
- New order (Cancelled)
- New order (Refunded)
- New order (Failed)
- Order status updated to Pending payment
- Order status updated to Processing
- Order status updated to On hold
- Order status updated to Completed
- Order status updated to Cancelled
- Order status updated to Refunded
- Order status updated to Failed
- Order status Pending payment to Processing
- Order status Pending payment to On hold
- Order status Pending payment to Completed
- Order status Pending payment to Cancelled
- Order status Pending payment to Refunded
- Order status Pending payment to Failed
- Order status Processing to Pending payment
- Order status Processing to On hold
- Order status Processing to Completed
- Order status Processing to Cancelled
- Order status Processing to Refunded
- Order status Processing to Failed
- Order status On hold to Pending payment
- Order status On hold to Processing
- Order status On hold to Completed
- Order status On hold to Cancelled
- Order status On hold to Refunded
- Order status On hold to Failed
- Order status Completed to Pending payment
- Order status Completed to Processing
- Order status Completed to On hold
- Order status Completed to Cancelled
- Order status Completed to Refunded
- Order status Completed to Failed
- Order status Cancelled to Pending payment
- Order status Cancelled to Processing
- Order status Cancelled to On hold
- Order status Cancelled to Completed
- Order status Cancelled to Refunded
- Order status Cancelled to Failed
- Order status Refunded to Pending payment
- Order status Refunded to Processing
- Order status Refunded to On hold
- Order status Refunded to Completed
- Order status Refunded to Cancelled
- Order status Refunded to Failed
- Order status Failed to Pending payment
- Order status Failed to Processing
- Order status Failed to On hold
- Order status Failed to Completed
- Order status Failed to Cancelled
- Order status Failed to Refunded
- Reset password notification
- Order fully refunded notification
- Order partially refunded notification
- New customer note notification
- Low stock notification
- No stock notification
- Product on backorder notification
- Created customer notification
* Please note, that new orders in WooCommerce by default are created with “Pending payment” status.
Shortcodes
[if][/if]
[clear]
[site_title]
[site_address]
[order_meta]
[order_func]
[order_number]
[order_total]
[order_total_tax]
[order_total_excl_tax]
[order_shipping_total]
[order_shipping_method]
[order_payment_method_title]
[order_total_items_count]
[order_date]
[order_details]
[order_billing_address]
[order_shipping_address]
if
shortcode
if
shortcode allows for conditional output of content.
Attributes
value1
– First value to compare. You can use shortcodes here by replacing[
and]
with{
and}
, for example, if you’d need to compare order total:value1="{order_total}"
.value2
– Second value to compare. You can use shortcodes here, similar as it is invalue1
.operator
– Comparison operator. Can beequal
,not_equal
,less
,less_or_equal
,greater
orgreater_or_equal
.
Examples
[if value1="{order_meta key='_my_meta_key'}" operator="greater" value2="0"]Content to output.[/if]
You can use shortcodes in content as well:
[if value1="{order_meta key='_my_meta_key'}" operator="greater" value2="0"][order_shipping_method][/if]
Changelog
2.6.0 - 30/11/2023
- Dev - Triggers - Extra - "Product published" and "Product updated" triggers added.
- Dev - Shortcodes -
[product_func]
shortcode added. - Dev - Code refactoring.
2.5.0 - 22/11/2023
- Dev - Order Options - "Require users" option added.
- Dev - Order Options - "Exclude users" option added.
- Dev - Order Options - "Require user roles" option added.
- Dev - Order Options - "Exclude user roles" option added.
- Dev - Code refactoring.
2.4.0 - 17/11/2023
- Dev - General - Advanced Options - "Use actions for WC email template" option removed (now always using actions).
- Dev - Email Data - "WC email template" option renamed to "Header & footer". Now the option is applied to "Plain text" emails as well.
- Dev - Using overridable email templates now.
- Dev - Code refactoring.
- Dev - Developers -
alg_wc_custom_emails_get_wc_email_template_part
filter removed. - Tested up to: 6.4.
- WC tested up to: 8.3.
2.3.0 - 03/11/2023
- Fix - Admin Options - Admin actions - Orders > Bulk actions - HPOS compatibility (
wc-orders
page). - WC tested up to: 8.2.
2.2.9 - 25/09/2023
- WC tested up to: 8.1.
- Plugin icon, banner updated.
2.2.8 - 17/08/2023
- Dev - Developers -
alg_wc_custom_emails_is_enabled
filter -$do_force_send
parameter added.
2.2.7 - 16/08/2023
- Fix - Declaring HPOS compatibility for the free plugin version, even if the Pro version is activated.
- Dev - General - "Base dir" option added (defaults to "WP root directory"). Affects the "Email attachments" options.
- Dev - Debug - Email attachments info added.
2.2.6 - 09/08/2023
- Dev - Admin settings - Delay - Description updated.
- Tested up to: 6.3.
- WC tested up to: 8.0.
2.2.5 - 04/08/2023
- Dev - Shortcodes -
[user_prop]
shortcode added. - Dev - Developers -
alg_wc_custom_emails_is_user_email
filter -current_filter()
parameter added.
2.2.4 - 03/08/2023
- Dev - Shortcodes -
[order_item_meta]
shortcode added.
2.2.3 - 18/07/2023
- Dev – "High-Performance Order Storage (HPOS)" compatibility.
- Dev - Developers -
alg_wc_custom_emails_subject
filter added. - Dev - Developers -
alg_wc_custom_emails_content
filter added. - WC tested up to: 7.9.
2.2.2 - 18/07/2023
- Dev - Developers -
alg_wc_custom_emails_do_send_order_email
filter added.
2.2.1 - 28/06/2023
- Dev - Shortcodes -
[order_payment_method_id]
shortcode added.
2.2.0 - 22/06/2023
- Dev - Order Options - "Require payment gateways" option added.
- Dev - Order Options - "Exclude payment gateways" option added.
- Dev - Order Options - "Require shipping methods" option added.
- Dev - Order Options - "Exclude shipping methods" option added.
- Dev - General - Advanced Options - "Use actions for WC email template" option added (defaults to
no
). - Dev - Developers -
alg_wc_custom_emails_get_wc_email_template_part
filter added.
2.1.0 - 18/06/2023
- Fix - Admin settings - "Shortcodes" link fixed in the "placeholder text".
- Dev - General - "Enable plugin" option removed.
- Dev - General - "Custom triggers" option added.
- Dev - Shortcodes -
[if]
-operator
-in
andnot_in
operators added. - Dev - Shortcodes -
[order_item_product_ids]
shortcode added. - Dev - Shortcodes -
[order_downloads]
shortcode added. - Dev - Shortcodes -
[order_user_data]
shortcode added. E.g.,[order_user_data key="user_nicename"]
. - Dev - Shortcodes -
[order_user_id]
shortcode added. - Dev - Developers -
alg_wc_ce_send_email()
function added. - Dev - Developers -
alg_wc_custom_emails_check_order_products
filter added. - Dev - Developers -
alg_wc_custom_emails_check_order_product_terms
filter added. - Dev - Code refactoring.
- WC tested up to: 7.8.
2.0.0 - 09/05/2023
- Dev - Code refactoring -
Alg_WC_Custom_Email
class. - WC tested up to: 7.6.
1.9.7 - 13/04/2023
- Fix - Email Data - Email attachments - Handling empty option value properly now.
1.9.6 - 10/04/2023
- Dev - Advanced Options - "Exclude recipients" option added.
- Dev - Admin Settings - Minor option titles, descriptions, style update.
1.9.5 - 05/04/2023
- Dev - Scheduled - "Unschedule email" (i.e., "Delete") buttons added.
- Dev - Developers -
alg_wc_custom_emails_do_send
filter added.
1.9.4 - 05/04/2023
- Fix - Admin Options - Admin actions - Empty value fixed.
1.9.3 - 31/03/2023
- Dev - Shortcodes -
[order_details]
- Now passing the email object to theWC_Emails::order_details()
function.
1.9.2 - 31/03/2023
- Dev - Email Data - "Email attachments" option added.
- Tested up to: 6.2.
1.9.1 - 23/03/2023
- Dev - WPML/Polylang language - Order language detection algorithm improved.
- Dev - WPML/Polylang language - Admin option renamed (was "Require WPML language").
- Dev - WPML/Polylang language - Code moved to the
Alg_WC_Custom_Email_Order_Validator
class. - WC tested up to: 7.5.
1.9.0 - 08/03/2023
- Dev - Admin Options - Admin actions - "Orders > Preview" option added.
- Dev - Admin Options - Admin actions - "Orders > Actions column" option added.
- Dev - Admin Options - Admin actions - Code refactoring.
- Dev - Developers -
alg_wc_custom_emails_order_product_term_ids
filter added.
1.8.0 - 08/03/2023
- Dev - Admin Options - "Admin actions" option added (defaults to "Edit order > Order actions" and "Orders > Bulk actions").
- Dev - Admin Options - Admin settings rearranged ("Settings Tools" subsection added).
- Dev - Order Options - Require/Exclude product categories/tags - Listing empty categories/tags as well now.
- Dev - Order Options - "Logical operator" option added (defaults to
AND
). - Dev - Order Options - Code refactoring (
Alg_WC_Custom_Email_Order_Validator
class added). - Dev - Shortcodes -
[if]
- Code refactoring. - Dev - Compatibility - "Email Customizer for WooCommerce (Pro)" by ThemeHigh - PHP notice (regarding calling the
wc_get_product()
function too early) fixed. - WC tested up to: 7.4.
1.7.2 - 26/01/2023
- Dev - Admin Options - "Copy settings" tool added.
- Dev - Admin Options - "Reset settings" tool added.
- Dev - Shortcodes -
[generate_coupon_code]
- Coupon description (post_excerpt
) updated.
1.7.1 - 21/01/2023
- Dev - Order Options - Require/Exclude products - Now using AJAX in admin settings.
- WC tested up to: 7.3.
1.7.0 - 24/12/2022
- Dev - Email Data - "Require WPML language" option added.
- Dev - Shortcodes -
[translate]
shortcode added (for WPML and Polylang plugins).
1.6.0 - 21/12/2022
- Dev - Order Options - "Require product categories" option added.
- Dev - Order Options - "Exclude product categories" option added.
- Dev - Order Options - "Require product tags" option added.
- Dev - Order Options - "Exclude product tags" option added.
- Dev - Admin settings rearranged; subsection titles added.
- Dev - Code refactoring.
- Deploy script added.
- Tested up to: 6.1.
- WC tested up to: 7.2.
1.5.5 - 06/10/2022
- WC tested up to: 6.9.
- Readme.txt updated.
1.5.4 - 12/09/2022
- Dev - Shortcodes -
[order_details]
-plain_text
andsent_to_admin
attributes added (both default tono
). - WC tested up to: 6.8.
1.5.3 - 20/07/2022
- Dev - Triggers - "Subscription status updated" trigger groups added ("WooCommerce Subscriptions" plugin).
- WC tested up to: 6.7.
1.5.2 - 30/06/2022
- Fix - Settings - Trigger(s) - "Extra" triggers were not added to the list. This is fixed now.
- Dev - Developers -
alg_wc_custom_emails_is_enabled
filter added. - WC tested up to: 6.6.
- Tested up to: 6.0.
1.5.1 - 01/08/2021
- Fix - Error on WooCommerce Analytics page fixed.
1.5.0 - 01/08/2021
- Fix - Shortcodes -
[order_shipping_total]
shortcode fixed. - Fix - Shortcodes -
[order_shipping_method]
shortcode fixed. - Fix - Shortcodes -
[order_payment_method_title]
shortcode fixed. - Dev - General - "Enabled triggers groups" option added.
- Dev - Triggers - "Subscriptions: Renewal order" trigger groups added.
- Dev - Shortcodes -
[order_item_names]
shortcode added. - Dev - Debug - More info is added to the log now.
1.4.1 - 28/07/2021
- Dev - Escaping all output now.
1.4.0 - 27/07/2021
- Dev - All user input is properly sanitized now.
- Dev - Localisation -
load_plugin_textdomain()
is called oninit
action now. - Dev - Code refactoring.
- Tested up to: 5.8.
- WC tested up to: 5.5.
- Free plugin version released.
1.3.1 - 05/04/2021
- Dev - Email content - "Default content" button added.
- Dev - Settings - Link to each email settings added.
- Dev - Email settings - Triggers list rearranged; settings descriptions updated.
- Dev - Code refactoring.
1.3.0 - 30/03/2021
- Dev - "Delay" options added (including "Scheduled" section).
- Dev - Now always adding order note when sending an email.
- Dev - Debug - More info added.
- Dev - Code refactoring.
1.2.1 - 22/03/2021
- Dev - "Send email: ..." actions added to the "Bulk actions" select box in admin "Orders" list.
- Dev - Code refactoring.
1.2.0 - 19/03/2021
- Dev - "Minimum order amount" option added.
- Dev - "Maximum order amount" option added.
- Dev - "Require order product(s)" option added.
- Dev - "Exclude order product(s)" option added.
- Dev - General - Advanced - "Debug" option added.
- Dev - Settings - Minor descriptions update.
- WC tested up to: 5.1.
- Tested up to: 5.7.
1.1.0 - 07/10/2020
- Dev -
[generate_coupon_code]
shortcode added. - Dev - Trigger -
alg_wc_custom_emails_is_user_email
filter added. - Dev - Settings - Minor descriptions update.
- WC tested up to: 4.5.
- Tested up to: 5.5.
1.0.0 - 21/01/2020
- Initial Release.