Triggering the variation swatches after AJAX loading
-
I would like to share the solution I’ve found regarding the variation swatches working after ajax loading. By default it doesn’t work. So if anyone having this trouble, simply add the following code into the functions.php file to initialize the swatches again after ajax loading.
jQuery(document).ajaxComplete(function(){ jQuery('.variations_form').each(function () { jQuery(this).wc_variation_form(); jQuery(this).tawcvs_variation_swatches_form(); }); });
One thing I would like to request to plugin author that if he could initialize the swatches on ajax load by default, it would be great.
Thanks
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Triggering the variation swatches after AJAX loading’ is closed to new replies.