diff --git a/plugins/woocommerce-admin/includes/data-stores/class-wc-admin-reports-orders-data-store.php b/plugins/woocommerce-admin/includes/data-stores/class-wc-admin-reports-orders-data-store.php index ff8adf7ce94..439d0adc9ee 100644 --- a/plugins/woocommerce-admin/includes/data-stores/class-wc-admin-reports-orders-data-store.php +++ b/plugins/woocommerce-admin/includes/data-stores/class-wc-admin-reports-orders-data-store.php @@ -79,7 +79,11 @@ class WC_Admin_Reports_Orders_Data_Store extends WC_Admin_Reports_Data_Store imp $status_subquery = $this->get_status_subquery( $query_args ); if ( $status_subquery ) { - $sql_query_params['where_clause'] .= " AND {$status_subquery}"; + if ( empty( $query_args['status_is'] ) && empty( $query_args['status_is_not'] ) ) { + $sql_query_params['where_clause'] .= " AND {$status_subquery}"; + } else { + $where_subquery[] = $status_subquery; + } } if ( $query_args['customer_type'] ) {