Adding Extra Customer Email In Woocommerce Checkout

admin2025-04-18  0

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

Share Improve this question asked Jul 2, 2016 at 18:52 NaFiNaFi 33 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1744949960a276273.html

最新回复(0)