You can fetch all WooCommerce orders of a single customer by different parameter.
Here you can find all orders of a customer by email id.
Use the following to fetch all orders of a single customer in WooCommerce by email ID.
You have to replace customer email id instead of ‘CUSTOMER_EMAIL_ID_HERE’.

$billing_email='CUSTOMER_EMAIL_ID_HERE';
$customer_orders = get_posts( array(
                    'meta_key'    => '_billing_email',
                    'meta_value'  => $billing_email,
                    'post_type'   => 'shop_order',
                    'post_status' => array_keys( wc_get_order_statuses() ),
                    'numberposts' => -1
                ));

Have any doubt, then comment here!

Leave a Reply

Your email address will not be published. Required fields are marked *