fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

variation swatches for woocommerce doesn’t work after ajax loading of products

Vlad Nesteruk

Hello,

Variation swatches do not work after ajax loading of goods that are located on the second and further pages. And they also stop working after applying filters on the store page.

At the initial loading of the store page, the switches work on all products that are displayed on the page.

After clicking on the “Load more” button or on the page switch under the goods “1, 2,3 ….” Or change some kind of filter to the product (By color, by brand …) Then the variation switches stop working.

Best Regards

Hakik Zaman

Hi Vlad,

Could you update your free and premium version of the WooCommerce Variation Swatches plugin?

The current version of swatches plugins is the following.

Variation Swatches for WoooCoommerce – Version 1.1.17

Variation Swatches for WooCommerce Pro – Version 1.1.17

Please make sure you are using the same version.

I have added the below code here and Swatch should work on 1,2,3 page.

jQuery(document).ready(function( $ ){

// Your code in here

jQuery( document ).on( ‘jet-filter-content-rendered’, function(){

jQuery(‘.variations_form’).each(function(){

jQuery(this).wc_variation_form();

});});

});

Please clear your cache (browser & caching plugin) before you check.

Thank You

Vlad Nesteruk

Hi Hakik,

I updated the plugins but now 2, 3 … the pages are not loading at all

Regards

Hakik Zaman

Hello Vlad,

I have created a screencast for you. Everything is working fine from my side.

Please clear your cache (browser & caching plugin) before you check.

I have also shown the WP Rocket cache clear process.

Thanks