Messing with REST API
-
Hello
Just to let you know your plugin is messing with the Woocommerce REST API. When active it make the pagination for the products API method not working (it always returns the page 1 products and ignore the page parameter).
I had to change the line 37 of inc/class-pagination.php from this :
if ( is_archive() || is_post_type_archive() || ! $is_product_query ) {
To this :
if ( is_archive() || is_post_type_archive() || ! $is_product_query || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) {
With this the plugin doesn’t interfere with the REST API anymore.
If you could add this to the next release it would be nice.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Messing with REST API’ is closed to new replies.