So, I solved the problem. Hope this helps other people.
The safest and almost βupdated way to saveβ in order to make the drop-down menu of the variable products work is to load add-to-cart-variation.min.js after loading a new pair of products again. Please focus on the part // Initialize again :
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) {
UPDATE
An even better way to cache a script file! GetScript () calls jQuery.get () witch is a shorthand Ajax function
$.ajax({ url: url, data: data, success: success, dataType: dataType });
So, by calling getScript (), you are calling an ajax call, and jQuery does not store any cache of your files. To cache the file also use the following
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 $.ajax({ type: "GET", // if wp is installed in a subfolder // url: "../sichere-anwendung/plugins/woocommerce/assets/js/frontend/add-to-cart-variation.min.js", url: "/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart-variation.min.js"), cache: true }); }); }