Query WooCommerce orders grouped by several order statuses
As I can see from WooCommerce documentation,
WC_Order_Query allows only one single order status to be passed as query parameter. Has anyone find some workaround to allow querying several order statuses in the same query?
Let’s say I want to query orders with “completed” AND “refunded” status.
How can this be done via standard
Example from doc:
// Get orders on hold. $args = array( 'status' => 'on-hold', ); $orders = wc_get_orders( $args );
WC_Order_Query WooCommerce documentation