• Resolved Vard

    (@rmichel0)


    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)
  • Plugin Contributor Iconic

    (@iconicwp)

    Hey Vard,

    Not sure if you’ve seen, but this plugin is no longer needed. WooCommerce added their own paginate="true" option to the products shortcode.

    As such, I no longer maintain this plugin.

    Thanks,
    James

Viewing 1 replies (of 1 total)
  • The topic ‘Messing with REST API’ is closed to new replies.