The API might have changed since the original question, but this is a lot more elegant and uses WC's own functions: $args = array( ...
If we want to query orders for a customer, we can check for the _customer_user meta key (the customer id) in the order, and we'll get orders that ...
Below you can find the code which will give you an array with orders value date and id $customer = wp_get_current_user(); // Get all customer ...
Create your own custom formats to determine which fields are included and where they're positioned. Automatically export ...
Hi, love your code and I am just wondering if I can display only products from specific order not products from all orders? Thanks in advance. Reply.
The customer can also find the order in: My Account > Orders.
Learn about the WooCommerce user roles and which permissions to give
By default, it's set to 15 (use -1 to display all orders.) Args: array( 'current_user' => '' ) [woocommerce_my_account]. Current user argument is automatically set ...
But here is the code to get an array of order ids tied to a customer.
customer management, order fulfillment, or simply need an easy way to get data out of WooCommerce.