Emails overview
Eight transactional emails ride on WooCommerce's built-in email engine. They appear at WooCommerce → Settings → Emails alongside the standard order emails, share the same header and footer template, and can be toggled, retitled, retemplated and translated like any other Woo email.
Prerequisites
- WooCommerce 9.0+ with transactional email sending working (test with a normal order first if you're unsure).
- A proper SMTP plugin in production.
wp_mail()via PHP'smail()is unreliable for renewal-volume sending.
The eight emails
| Class | Trigger | To |
|---|---|---|
ASWC_LoaderRenewal_Subscription_Invoice_Email | Successful renewal charge | Customer |
ASWC_LoaderReminder_Email | N days before the next renewal (configurable in settings) | Customer |
ASWC_LoaderPlan_Going_To_Expire_Email | N days before a fixed-length plan expires | Customer |
ASWC_Expired_Subscription_Email | Subscription reaches end of its fixed term | Customer |
ASWC_LoaderPause_Subscription_Email | Customer or admin pauses a subscription | Customer |
ASWC_LoaderReactivate_Subscription_Email | Paused or on-hold subscription becomes active again | Customer |
ASWC_Cancel_Subscription_Email | Subscription cancelled (by customer, admin or after exhausted retries) | Customer |
ASWC_Onhold_Active_Subscription_Email | Subscription transitions to on-hold (failed payment, manual review) | Merchant |
Toggling and customising
Each email has its own row at WooCommerce → Settings → Emails. Click the email name to:
- Enable or disable sending entirely.
- Override the recipient (defaults are customer for customer-facing emails, admin email for merchant-facing).
- Change the subject and heading. Both accept WooCommerce placeholders like
{site_title},{order_number}, and the plugin-added{subscription_id}and{next_payment_date}. - Switch between plain-text and HTML versions.
Overriding templates
Templates live under /templates/emails/ and /includes/loader/emails/ in the plugin. To override one, copy it to your-theme/advanced-subscriptions-for-woocommerce/emails/. Both HTML and plain-text versions exist; the plain version lives under emails/plain/ and follows the same naming convention.
For visual styling (logo, colours, footer text), use WooCommerce → Settings → Emails → Email Template. Those settings apply to both Woo's own emails and ours.
Relevant hooks
aswc_email_classes— register an additional email class.aswc_email_recipient_renewal_invoice— change recipients per email (one filter per email).aswc_email_placeholders— add custom{placeholder}tokens available in subject and heading.aswc_reminder_days_before_renewal— programmatically override the reminder lead time per subscription.