To get the User ID from the Order ID, you can use many ways, Here are 2 of them: In WooCommerce 3.0+ you can use WC_Order Class ...
The only thing I'm missing is getting the *user_id*. How can I get the user (in detail: the id), from my WooCommerce Order? code: function ...
Try belo: In WooCommerce 2.5, use get_post_meta() function this way: $user_id = get_post_meta($order_id, '_customer_user', true);.
Or maybe the order ID, customer ID, billing info, payment method, total refunds and so on…
Get current user ID, find ID by username, email, first and last names, get WooCommerce customer from an order and other examples.
Therefore, once we have the order ID, we can find the customer data by
There are several reasons you might want to get all WooCommerce orders for a customer in your shop.
WC_Abstract_Order::get_user_id Get user ID. Used by orders, not other order types like refunds. woocommerce.
Any User ID set for a customer will not be respected on creation. The ID column can ...
Get the current user's ID.