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 ...
Maximum order amount allowed when using the coupon. email_restrictions, array, List of email addresses that can use this coupon. used_by, array, List of user IDs ...
This is a list of plugins (though not an exhaustive one!) that are known to be compatible with WooCommerce Customer / Order ...
LOOP THROUGH ORDERS AND GET PRODUCT IDS. if ( !
The customer can also find the order in: My Account > Orders.
Or maybe the order ID, customer ID, billing info, payment method, total refunds and so on…
select. p.ID as order_id,. p.post_date,. max( CASE WHEN pm.meta_key = ' _billing_email' and p.ID = pm.post_id THEN pm.meta_value END ) as billing_email,.
This code worked but show all orders product! I want to show user orders that are logined, not all orders...