I'm using WooCommerce for my website. I need to change the body of the email in 'Cancelled order'. I want to add my own content in the email body, There is no option to edit the body in the dashboard. Are there any hooks to change the email body?
Asked
Active
Viewed 2,216 times
0

LoicTheAztec
- 229,944
- 23
- 356
- 399

batMask
- 734
- 3
- 17
- 35
-
See if this help you : https://wisdmlabs.com/blog/customize-woocommerce-order-emails/ – Helping Hands Nov 30 '15 at 10:26
-
Yes read this too. We can only edit the template file here, I'm finding a way to give this option through the dashboard. – batMask Nov 30 '15 at 14:52
1 Answers
1
You need to override Cancelled order email template.
To override and edit this email template copy :
woocommerce/templates/emails/admin-cancelled-order.php to your theme folder: yourtheme/woocommerce/emails/admin-cancelled-order.php.
Now edit this file to change simple table header changes.
If you need to change table body content then you need to copy:
woocommerce/templates/emails/email-order-items.php to your theme folder: yourtheme/woocommerce/emails/email-order-items.php,
because from admin-cancelled-order.php file table body, this function
<?php echo $order->email_order_items_table( false, true ); ?>
is called which in turns calls the template email-order-items.php.
-
Thanks. I have read this from Woothemes, But here we need to edit the template file, I'm finding a way that, admin can add some extra text to the mail body through the wordpress dashboard. Because admin don't have a coding knowledge. – batMask Nov 30 '15 at 14:47