Calculate different order status count and total cash for each order status in Woocommerce
问题 I need to get the order total of a different status in between some days in woocommerce query. For it to loop through all orders in between some day I use the following query: $args = array( 'post_type' => 'shop_order', 'post_status' => 'publish', 'posts_per_page' => -1, 'date_query' => array( array( 'after' => array( 'year' => 2016, 'month' =>01, 'day' =>01, ), 'before' => array( 'year' => 2016, 'month' => 01, 'day' =>30, ), 'inclusive' => true, ), ), ); $loop=new WP_Query($args); By using