I am trying to add customer info to the woocommerce admin order page. When users create their accounts, we store customer info in the user meta. When the customer places an order, I want to show it in the order details. I am using the woocommerce_admin_order_data_after_billing_address hook where I have a $order object; how can I get the customer_id from $order?
add_action( 'woocommerce_admin_order_data_after_billing_address', 'ae_customer_details' , 10, 1 );
function ae_customer_details($order){
echo "<p><strong>Custom Details:</strong> " . get_user_meta( $user_id, '_custom_details', true ) . "</p><br>";
}