Send woocommerce emails on custom email field
-
Hi,
I want to send an CC email after checkout process from another custom email field created by this plugin. (https://nimb.ws/X2HLrv)
As you can see above screenshot I have created new email field named “buyers_email”.
I used guidance from old issue but it not works form mine.https://www.ads-software.com/support/topic/use-custom-email-field-value-to-send-cc-new-order-mail/
https://www.ads-software.com/support/topic/send-order-notification-to-additional-email-field/Below is my code I have added in functions.php file:-
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, ‘buyers_email’, true);
if($aditional_email){
$emails .= ‘,’.$aditional_email;
}
return $emails;
}Can you please guide me or find any mistake in my code above.
Best regards
AbhileshThe page I need help with: [log in to see the link]
- The topic ‘Send woocommerce emails on custom email field’ is closed to new replies.