Hi there,
I'm using filter[posts_per_page] to retrieve a collection of posts for my application. The problem I'm facing is that the filter[posts_per_page] parameter is not updating the X-WP-TotalPages header as returned in the response by the server.
However, if I use per_page parameter in the request, it's updating the X-WP-TotalPages accordingly.
Consider the following request to the server:
$ GET /wp/v2/posts?filter[posts_per_page]=5
The headers returned are as follows:
X-WP-Total → 45
X-WP-TotalPages → 5
Now if I use the per_page parameter like the following:
$ GET /wp/v2/posts?per_page=5
The headers returned are like the following:
X-WP-Total → 45
X-WP-TotalPages → 9
It can be seen that the later one updated the X-WP-TotalPages header accordingly.
I think that the X-WP-TotalPages should be updated whenever a request is made via filter[posts_per_page] parameter.