我想删除纯文本电子邮件中指向商店管理员的链接,但保留其他信息(总计,付款方式,交货)。
我找到了模板admin_new_order.php
和该行,但是细节方面我的研究并不成功。
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
如何找到总计,付款类型,交付和链接的可用字段?如何删除链接?
答案 0 :(得分:0)
您要查找的代码可以在以下模板文件中找到
emails/plain/email-customer-details.php
- 可以将该模板复制到
yourtheme/woocommerce/emails/plain/email-order-details.php
来覆盖它。
在您创建的模板文件的副本中,您可以删除:49 - 52行
if ( $sent_to_admin ) {
/* translators: %s: Order link. */
echo "\n" . sprintf( esc_html__( 'View order: %s', 'woocommerce' ), esc_url( $order->get_edit_order_url() ) ) . "\n";
}