• henkesan

    (@henkesan)


    Firts of all thanks for a great plugin!
    However we have some trouble with a 3rd party service called Sharepine trying to read/sync our products via https://woocommerce.github.io/woocommerce-rest-api-docs/#pagination

    They tell us they get an output of endless pagination. They can’t correctly sync our products because Shortcode Pagination creates an endless pagination which never stops.

    They specifically told us this piece of code is the problem:

    global $wp_query;
    
            if ( ! isset( $GLOBALS['woocommerce_loop']['pagination'] ) )
                return;
    
            $wp_query->query_vars['paged'] = $GLOBALS['woocommerce_loop']['pagination']['paged'];
            $wp_query->query['paged'] = $GLOBALS['woocommerce_loop']['pagination']['paged'];
            $wp_query->max_num_pages = $GLOBALS['woocommerce_loop']['pagination']['max_num_pages'];
            $wp_query->found_posts = $GLOBALS['woocommerce_loop']['pagination']['found_posts'];
            $wp_query->post_count = $GLOBALS['woocommerce_loop']['pagination']['post_count'];
            $wp_query->current_post = $GLOBALS['woocommerce_loop']['pagination']['current_post']; 

    The plugin works great for everything else on our website. But we really need to get this working with Sharespine. They cant do anything as they are relying on https://woocommerce.github.io/woocommerce-rest-api-docs/#pagination

    I don’n know exactly how their system works, but this is the problem they have. Hope it makes any sense.

  • The topic ‘Problem with endless pagination’ is closed to new replies.