Custom WC email recipient
-
Hi!
My goal is when my customer make an order, then WC sends a custom email to recipient which is in order custom field.
My current code is following:
... add_filter('woocommerce_email_recipient_new_order', 'additional_email_checkout', 10, 2); function additional_email_checkout($emails, $object){ $aditional_email = get_post_meta($object->id, 'vuokranantajan_sahkopostiosoite_field', true); if($aditional_email){ $emails .= ','.$aditional_email; } return $emails; }
Problem is that wrong email are sent. I want to send a custom email, not a WooCommerce’s default admin new order email.
(sorry for bad english)
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom WC email recipient’ is closed to new replies.