I want to know how to call out a extra email filed in woocommerce checkout page. By default there is a email filed for customers to fill in, once he/she checkout they will receive the order copy. I just want to call out another email filed eg Email 2 then that email also should receive the copy. Already tried finding for plugins but didn't work. Any idea to execute..! Thank You
I want to know how to call out a extra email filed in woocommerce checkout page. By default there is a email filed for customers to fill in, once he/she checkout they will receive the order copy. I just want to call out another email filed eg Email 2 then that email also should receive the copy. Already tried finding for plugins but didn't work. Any idea to execute..! Thank You
This solution seems to be very close to what you need. But can't say duplicated as you will need to do some coding to get 2nd email address. Check out.
Adding a second email address to a completed order in WooCommerce
To get email field from checkout try
get_post_meta( $order_id, '_custom_field', true );
now you might want to get $order_id
add_action ('woocommerce_thankyou', 'myfunction');
function myfunction($order_id) {
$order = new WC_Order($order_id);
print $order_id.', '.$order->get_total();
}
Hopefully this will take you in right direction.