Send email to custom email field
-
Hey, I’m using your plugin for adding a custom email field on the checkout page. Now I want to send a custom mail to that email which is added in the custom field.
Can you please suggest to me the code snippet for the same? I’ve tried with the below code
“$a = get_post_meta($order->id, ‘Email send for approval’, true);
$to = $a; // [email protected]
$subject = ‘The subject’;
$body = ‘The email body content’;
$headers = array(‘Content-Type: text/html; charset=UTF-8’);wp_mail( $to, $subject, $body, $headers );”
But It is giving an error for the order id and it is not working as expected.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Send email to custom email field’ is closed to new replies.