How can I list WooCommerce orders ( WC_Order ) of certain WC_Customer?

With WooCommerce 2.4.13, I would like to obtain a list of orders ( WC_Order ) of certain customers ( WC_Customer , not only the current logged-in customer ). From the documentation, the class WC_Customer has no public property / function to access associated order records.

How can I achieve this? the only solution I can think of is to fetch the raw data from the database. Any better solution?

p.s. It seems it’s difficult to obtain the list of WooCommerce customers as well.

Read more here: How can I list WooCommerce orders ( WC_Order ) of certain WC_Customer?

Leave a Reply

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