Currently I am using
$order = new WC_Order($order_id);
(using a web form)for fetching customer details related to that order id. I just want to be able to fetch customer details like billing and shipping address using customer's billing email or billing phone from database. thank you in advance. :)
You can try via:
$customer_id = get_current_user_id();
print get_user_meta( $customer_id, 'billing_phone', true );
print get_user_meta( $customer_id, 'billing_email', true );
honestly, not tested
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With