我'm using WooCommerce for my website. I need to change the body of the email in '取消订单' . 我想在电子邮件正文中添加我自己的内容,没有选项可以在仪表板中编辑正文 . 是否有任何钩子来改变电子邮件正文?
您需要覆盖已取消的订单电子邮件模板 .
要覆盖和编辑此电子邮件模板副本:woocommerce/templates/emails/admin-cancelled-order.php 到您的主题文件夹: yourtheme/woocommerce/emails/admin-cancelled-order.php .现在编辑此文件以更改简单的表头更改 .
如果您需要更改表体内容,则需要复制:woocommerce/templates/emails/email-order-items.php 到你的主题文件夹: yourtheme/woocommerce/emails/email-order-items.php ,因为从 admin-cancelled-order.php 文件表体,这个函数<?php echo $order->email_order_items_table( false, true ); ?>被调用,然后调用模板 email-order-items.php .
<?php echo $order->email_order_items_table( false, true ); ?>
1 回答
您需要覆盖已取消的订单电子邮件模板 .
要覆盖和编辑此电子邮件模板副本:
woocommerce/templates/emails/admin-cancelled-order.php 到您的主题文件夹: yourtheme/woocommerce/emails/admin-cancelled-order.php .
现在编辑此文件以更改简单的表头更改 .
如果您需要更改表体内容,则需要复制:
woocommerce/templates/emails/email-order-items.php 到你的主题文件夹: yourtheme/woocommerce/emails/email-order-items.php ,因为从 admin-cancelled-order.php 文件表体,这个函数
<?php echo $order->email_order_items_table( false, true ); ?>
被调用,然后调用模板 email-order-items.php .