Many times in woocommerce shopping websites, shop managers cannot send the order cancellation emails to their customers. Problems may be many, but despite of having all things on the right place, you cannot send the emails. In order to resolve this issue, add the following code into your theme function.php file and click save/update file. (Wordpress Admin Panel>Appearance>Editor>Theme Function.php).
Now, place a test order, and cancel it, and you will receive order cancellation email on your registered email id as customer.
/*
* Add customer email to Cancelled Order recipient list */
function wc_cancelled_order_add_customer_email( $recipient, $order ){
return $recipient . ',' . $order->billing_email; }
* Add customer email to Cancelled Order recipient list */
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 );
Now, place a test order, and cancel it, and you will receive order cancellation email on your registered email id as customer.
No comments:
Post a Comment