Overview
WooCommerce includes a comprehensive email notification system that automatically sends emails to customers and store administrators for various order events. The system is highly customizable through hooks, filters, and custom email classes.Default WooCommerce Emails
WooCommerce sends these emails by default:Customer Emails
New Order
Sent to customers when a new order is placed.
Processing Order
Sent when order status changes to Processing.
Completed Order
Sent when order status changes to Completed.
Refunded Order
Sent when an order is refunded.
Cancelled Order
Sent when an order is cancelled.
Failed Order
Sent when an order payment fails.
Customer Invoice
Manual invoice email that can be sent by admin.
Customer Note
Sent when a customer note is added to an order.
Reset Password
Password reset email for customer accounts.
New Account
Welcome email when a customer account is created.
Admin Emails
- New Order: Notifies admin when new order is received
- Cancelled Order: Notifies admin when order is cancelled
- Failed Order: Notifies admin when order payment fails
Email Template Structure
WooCommerce email templates follow this hierarchy:Template Overrides
Override email templates in your theme:1
Create email directory in your theme
2
Copy template file
Copy the template from WooCommerce to your theme:
3
Customize the template
Edit the template in your theme directory. Your changes will override the default.
Customizing Email Content
Email Heading and Subject
Customize email headings and subjects with filters:Adding Custom Content
Add content before or after various sections:Available Email Hooks
Email Hook Reference
Email Hook Reference
Header Hooks:
woocommerce_email_header- Before email header
woocommerce_email_before_order_table- Before order detailswoocommerce_email_after_order_table- After order detailswoocommerce_email_order_meta- Order meta sectionwoocommerce_email_customer_details- Customer details section
woocommerce_email_footer- Before email footer
woocommerce_order_item_name- Product name in emailwoocommerce_order_item_quantity_html- Product quantity display
Styling Emails
Customizing Email Styles
Email styles are defined inline for email client compatibility:Using Custom Email Template Colors
Set custom colors in WooCommerce settings:Creating Custom Emails
Create a completely custom email class:1
Create email class
Create a new class extending
WC_Email:2
Register email class
Add your email to WooCommerce:
3
Create email template
Create
templates/emails/custom-email.php in your plugin:4
Trigger the email
Testing Emails
Send Test Emails
Manually trigger emails for testing:Email Preview
Add email preview capability:Email Attachments
Add attachments to emails:Advanced Customization
Conditional Email Sending
Prevent emails from sending based on conditions:Custom Email Recipients
Add additional recipients:Email Settings
Access email settings programmatically:Troubleshooting
Emails not sending
Emails not sending
Check WordPress email configuration:Consider using an SMTP plugin like WP Mail SMTP or Post SMTP.
Email styling broken
Email styling broken
Ensure CSS is inline (email clients strip
<style> tags):Next Steps
Template Overrides
Learn about template customization
Hooks and Filters
Master WooCommerce hooks