email-notifications

Send an Email notification to the admin for pending order status in WooCommerce

爷,独闯天下 提交于 2019-11-27 01:42:16
问题 In WooCommerce, when a customer goes to checkout from cart and submit the order, if the payment is not processed, the order is set to "pending" payment. The Admin doesn't received any email about. I would like to send an email to Admin for this kind of orders. How can I do it? 回答1: UPDATE 2 (Change from woocommerce_new_order to woocommerce_checkout_order_processed thanks to Céline Garel) This code will be fired in all possible cases when a new order get a pending status and will trigger

Sending email to customer on cancelled order in Woocommerce

筅森魡賤 提交于 2019-11-26 23:12:32
问题 I am trying to send an email to the client when an order gets cancelled. By default, woocommerce only sends this email only to the admin of the site. This code has solved the issue for related posts on the web: function wc_cancelled_order_add_customer_email( $recipient, $order ){ return $recipient . ',' . $order->billing_email; } add_filter( 'woocommerce_email_recipient_cancelled_order', 'wc_cancelled_order_add_customer_email', 10, 2 ); add_filter( 'woocommerce_email_recipient_failed_order',