Remove limit from coupons query when getting the total count (https://github.com/woocommerce/woocommerce-admin/pull/8001)
* Remove limit from coupons query when getting the total count. * Add changelog
This commit is contained in:
parent
5f8db47c16
commit
6c2fbce0c0
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: Fix
|
||||
|
||||
Fix pagination issue with Analytics Coupons page. #8001
|
|
@ -283,7 +283,7 @@ class DataStore extends ReportsDataStore implements DataStoreInterface {
|
|||
$this->subquery->add_sql_clause( 'limit', $this->get_sql_clause( 'limit' ) );
|
||||
$coupons_query = $this->subquery->get_query_statement();
|
||||
|
||||
$this->subquery->clear_sql_clause( array( 'select', 'order_by' ) );
|
||||
$this->subquery->clear_sql_clause( array( 'select', 'order_by', 'limit' ) );
|
||||
$this->subquery->add_sql_clause( 'select', 'coupon_id' );
|
||||
$coupon_subquery = "SELECT COUNT(*) FROM (
|
||||
{$this->subquery->get_query_statement()}
|
||||
|
|
Loading…
Reference in New Issue