I'm running a Wordpress Woocommerce-Shop with an infinite scroll plugin to automatically load the next set of products on my shop page.
There are some variable products with dropdown menus, which are displaying the price after selecting the attributes (default woocommerce function).
Unfortunately this function only works on the initial page Load and breaks on products which loaded with the infinite scroll after scrolling down.
So I guess I must reinitialize the js scripts which are responsible for the function again after each infinite page scroll. The infinite scroll plugin has the following
part (function(newElements)..)
to initialize functions after loading new elements. Any Idea (if possible update safe) how to reinitialize the woocommerce scripts for variable Products again? I guess it is at least the add-to-cart-variation.min.js
if (obj_nes.infinitescroll != 'disable') {
nextSelector = obj_nes.nextselector;
nextSelector = '#navigation #navigation-next a';
$masonry.infinitescroll({
navSelector : '#navigation',
nextSelector : nextSelector,
itemSelector : '.product',
prefill: true,
bufferPx : 900,
loading: {
msgText: '',
img: '',
finished: function() {}
}
}, function(newElements) {
// Initialize again
});
}