Dokan 插件为单个订单的客户发送多封电子邮件 [英] Dokan plugin sends multiple email for customer for single order

查看:92
本文介绍了Dokan 插件为单个订单的客户发送多封电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 Dokan 多供应商插件以及我的 woocommerce,如果订单包含不同卖家的产品,它会为单个订单的客户发送多封电子邮件.

I have installed Dokan multivendor plugin along with my woocommerce and it sends multiple email for customer for a single order if the order contains diffrent seller's product.

订单邮件如下,

  1. 邮寄购买的所有产品.
  2. 订单中只有一位卖家的产品.

如何防止发送多封邮件,我只需要向客户发送摘要邮件,即所有产品的邮件与单个邮件.

How can I prevent sending multiple mails, I just need to send summary mail to customer, that is the mail with all product with single mail.

有什么帮助吗?

推荐答案

当客户从多个供应商处购买产品时,客户将收到关于每个子订单和父订单的电子邮件.

When a customer will purchase a product from multiple vendors that time the customer will get an email for each sub-order and the parent order.

此客户通知来自 WooCommerce/includes/class-we-emails.php 文件.你可以查看这个函数——public function init().他们已经包含了发送电子邮件的每个文件通知.每次系统收到订单时,钩子都会运行.现在,如果您希望该客户不会收到每个子订单的电子邮件,那么您必须使用过滤器取消设置这些关键的 `emails['WC_Email_New_Order'].

This customer notification is coming from the WooCommerce/includes/class-we-emails.php file. You can check this function- public function init(). They have included every file notification to send the email. The hook will run everytime when the system will get an order. Now, if you want that customer will not get an email for each sub-order then you have to unset those key `emails['WC_Email_New_Order']by using the filter.

此外,您可以打开 dokan-lite/includes/wc-crud-functions.php.在此文件中,您可以找到操作- do_action( 'woocommerce_new_order', $order_id ); 您可以通过订单 id 找到子订单,并且可以在订单为子时取消设置订单通知键-顺序.

Also, you can open dokan-lite/includes/wc-crud-functions.php. In this file you can find the action- do_action( 'woocommerce_new_order', $order_id ); You can find the sub-order by order id and you can unset the order notification key by when the order is sub-order.

这篇关于Dokan 插件为单个订单的客户发送多封电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆