需要在自定义插件的wc_get_template()中调用页面作为电子邮件模板

时间:2018-09-19 06:39:30

标签: wordpress email woocommerce

我正在创建一个自定义插件,在其中实现了向客户发送自定义电子邮件的功能。

我无法包含自定义页面作为email_template。

$template_name = 'emails/new-order-customer-email.php' ;
$default_path = plugin_dir_path( __FILE__ ) . 'templates/';
$data = wc_get_template( $template_name, array(),'',$default_path );

我想使用new-order-customer-email.php文件作为插件中的自定义电子邮件模板。 当前,当我使用wc_get_template_html()函数时,它将包含child-theme / woocommerce / emails / new-order-customer-email.php中的文件

请提出建议

0 个答案:

没有答案
相关问题