Php 自定义WC电子邮件模板

Php 自定义WC电子邮件模板,php,wordpress,templates,woocommerce,hook-woocommerce,Php,Wordpress,Templates,Woocommerce,Hook Woocommerce,我遵循创建一个自定义电子邮件纯文本与特定参数发送短信时,一个新的订单被确认 我遵循所有指示,但我会这样更改操作: // template path define( 'CUSTOM_TEMPLATE_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/templates/' ); // hook for when order status is changed add_action( 'woocom

我遵循创建一个自定义电子邮件纯文本与特定参数发送短信时,一个新的订单被确认

我遵循所有指示,但我会这样更改操作:

    // template path
    define( 'CUSTOM_TEMPLATE_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/templates/' );
    // hook for when order status is changed
    add_action( 'woocommerce_new_order', array( &$this, 'custom_trigger_email_action' ), 10, 2 );
    // include the email class files
    add_filter( 'woocommerce_email_classes', array( &$this, 'custom_init_emails' ) );
我会翻译一些以适应我的语言(法语)

电子商务>设置>电子邮件 我可以看到我的自定义模板电子邮件,但我有一个问题。他不想在目录中找到电子邮件模板

这就是我现在拥有的:

Name of plugin/
——————–/custom-email-manager.php
——————–/emails
—————————–/class-custom-email.php
因为我可以在woocommerce的设置中管理自定义电子邮件,所以在此之前一切正常

在第3步,Dev说

遵循商业结构

然后

你能帮我理解我的错误吗


致以最诚挚的问候。

看起来您可能已经使用文档处理器编辑了代码,因为该代码中有非ascii单引号。嗨,我使用记事本++编辑代码,不管怎样,记事本++给了我很好的结果。我改为标准引号,不做任何更改。仍然找不到任何电子邮件/模板\u htmland电子邮件/纯文本/模板\u纯文本。答案是Thx。看起来你可能用文档处理器编辑了代码,因为代码中有非ascii单引号。嗨,我用记事本++编辑代码,结果很好。不管怎样,我改为标准引号没有任何变化。仍然找不到任何电子邮件/模板\u htmland电子邮件/纯文本/模板\u纯文本。谢谢你的回答。
Name of plugin/
——————–/custom-email-manager.php
——————–/emails/
—————————–/class-custom-email.php
——————-/templates/
———————————/emails/
——————————————-/custom-item-email-html.php
——————————————-/plain/
—————————————————/custom-item-email.php