V
V
Vladimir Kai2019-05-22 10:54:31
WordPress
Vladimir Kai, 2019-05-22 10:54:31

How to send order email to customer and recipient list - WooCommerce?

Good afternoon!
I have the following problem: I
have a site on Wordpress + WooCommerce
Payment is accepted only through PayPal
When creating an order, it is proposed to immediately pay for the goods.
The client is redirected to the PayPal payment gateway.
In the admin panel, an order is placed in the PENDING status
5ce4ffd94a214515071526.png
. At the same time, no notifications are sent to either the admin or the client.
How to make a notification about a new order?
Type until the order is paid, then nothing will change.
There will be no notifications.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pychev Anatoly, 2019-05-22
@gold_dezmor

Yes, by default, until the order is paid, the letters are not sent.
If you want to receive an email earlier, then you need to respond to the woocommerce_checkout_order_processed. It is activated before being transferred to the payment gateway, when the order is already fully formed and verified. Using this hook, you can send an email using wp_mail
. If you want to add a new setting to the "Mail" tab of the woocommerce settings panel, where the admin can change recipients and other parameters, then you need to create a new class derived from WC_Email, connect it to the system notifications, and in this class react to the above hook

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question