A native Pinterest integration for WooCommerce. Development is managed by Ventures.
GNU General Public License v3.0
22
stars
9
forks
source link
Issues table pagination does not respect the page number and page size, and always return all issues #936
Closed
ecgan closed 1 month ago
Describe the bug:
Related to issue https://github.com/woocommerce/pinterest-for-woocommerce/issues/882.
In the Issues table, I have pagination in the table footer like this:
There are issues with the pagination:
Here's a screenshot of the API call:
From the client side, we pass
paged
andper_page
parameters to the API.However, on the server side, those parameters are not really used:
https://github.com/woocommerce/pinterest-for-woocommerce/blob/8251408b26fc5838f76b76518e2942efea8efa84/src/API/FeedIssues.php#L39-L74
Specifically, in the following line, we set the limit to be 250, instead of the
per_page
value:https://github.com/woocommerce/pinterest-for-woocommerce/blob/8251408b26fc5838f76b76518e2942efea8efa84/src/API/FeedIssues.php#L59
I believe the above is the cause of issue.
Steps to reproduce:
Expected behavior:
Pagination should work as expected.
Actual behavior:
The table will always show all data, regardless of how you set pagination.