• Hey
    There is an issue with your plugin and lazy load (eg the one from WP Rocket)

    Is there any hook to trigger after your plugin renders the page? (Via Javascript)

Viewing 1 replies (of 1 total)
  • Plugin Author Algoritmika

    (@algoritmika)

    Hi @seldimi,

    To be honest, caching etc. is not exactly my “area of expertise” (for example I was thinking that lazy loading is primarily used for loading the images), however, our plugin isn’t actually rendering the page. Instead it uses WooCommerce loop_shop_per_page filter to change the number of outputted products. As for displaying the “product per page” dropdown on the frontend – by default it’s done in woocommerce_before_shop_loop action. I could add a hook you requested, but, to be honest, I’m not sure what exactly do I need to to do. And our plugin doesn’t use any JavaScript.

    Maybe the problem is in caching? If that’s the case, most caching plugins allow you to disable caching if some cookie is set. In this case, you can add our alg_wc_products_per_page cookie there. Be sure to leave “Enable cookie” checkbox set in our plugin settings. Alternatively, I could add an option to use URL param for products per page (i.e. $_GET instead of currently used $_POST) – as far as I know, caching plugins never cache pages when there are any params in the URL (e.g. it would be something like https://example.com/?alg_wc_products_per_page=10).

    Please let me know what you think.

Viewing 1 replies (of 1 total)
  • The topic ‘Issue with lazyload’ is closed to new replies.