You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WooCommerce自定义订单状态邮件通知加载问题求助

WooCommerce自定义订单状态邮件通知加载问题求助

各位大佬好!我最近在给WooCommerce配置自定义订单状态的邮件通知时,遇到了邮件类加载相关的问题,下面是我functions.php里的相关代码片段,麻烦帮忙看看哪里出错了?

我的functions.php代码:

add_filter('woocommerce_email_classes', 'add_custom_order_status_emails');  
function add_custom_order_status_emails($emails) {  
    $emails['WC_Email_Customer_Doi_Xac_Nhan_Order'] = include get_stylesheet_directory() . '/woocommerce/emails/class-wc-email-customer-doi-xac-nhan-order.php';  
    `$email_admin = include get_stylesheet_directory() . '/woocommerce/emails/class-wc-email-admin-da-cap-nhat.php';`  
    `$email_customer = include get_stylesheet_directory() . '/wooco

注:最后这段代码没粘贴完整,不过我主要疑惑的是后面两行加载邮件类的写法——用了反引号包裹,而且没有把这两个邮件类添加到$emails数组里,是不是这就是问题根源?有没有正确的加载方式可以指点下?

备注:内容来源于stack exchange,提问作者chens11111010001

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.13 17:37:57