Open
Description
Currently this API implementation does not offer a pagination feature.
https://woocommerce.github.io/woocommerce-rest-api-docs/#pagination
Would it be possible to perform pagination inside your API class? - And recursively perform the requests until the last page is received?
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Pagination not supported[/-][+]Pagination support[/+]aapjeisbaas commentedon Mar 31, 2023
I just needed this and a wrote a little pagination inside a product fetch function:
Use it for inspiration maybe someone want to implement this into the package as a wrapper.
Explanation:
The requests object returned from wcapi.get has a links object which represents the
Link
return header and the named links that were in there.The links object is an empty dict if there are no link headers defined.
sidenote: requests also has a r.next but it is not implemented to support this type of pagination.