fbpx
🀝  NEW YEAR SALE RETURNS - 50% OFF all plans! 🀝 Grab it Now

Swatches not working with infinite scroll in astra pro

Hi,

Product is great, but when I turn on infinite scroll in Astra Pro the swatches will not change the images for the new products that load on scrolling.

Is there a simple way to fix this?

Thank you

Tanvirul Haque

Hi Chris,

Thanks for reaching us.

We need an event from your filter plugin should be triggered after new posts are loaded.

Just send this plugin to your theme/plugin developer: https://wordpress.org/plugins/malinky-ajax-pagination/

And ask them to send a js event trigger like following as the Malinky Ajax Pagination plugin provides.

document.addEventListener(‘malinkyLoadPostsComplete’, function(e) {
console.log(‘LoadPostsComplete’);
});

Like this filter plugin: https://woocommerce.com/products/product-filters/
jQuery(document).ready(function( $ ){
// Your code in here
jQuery(window).on(‘wcpf_update_products’, function () {
console.log(‘Hi’);
});
});

Thank You