I have a function that does this:
$order = new WC_Order($order_id); $customer = new WC_Customer($order_id);
How can I get customer details fr
Get the customer id from the order object:
$order = new WC_Order($order_id); // Here the customer data $customer = get_userdata($order->customer_user); echo $customer->display_name;