Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $user_id='CUSTOMER_USER_ID_HERE';
- $customer_orders = get_posts( array(
- 'meta_key' => '_customer_user',
- 'meta_value' => $user_id,
- 'post_type' => 'shop_order',
- 'post_status' => array_keys( wc_get_order_statuses() ),
- 'numberposts' => -1
- ));
Add Comment
Please, Sign In to add comment