Re-init variations add to cart form

<?php

add_action( 'facetwp_scripts', function() {
	?>
	<script>
        (function($) {
            document.addEventListener('facetwp-loaded', function() {
                if ( typeof wc_add_to_cart_variation_params !== 'undefined' ) {
                    $('.variations_form').each(function () {
                        $(this).wc_variation_form();
                    });
                }
            });
        })(jQuery);      
	</script>
	<?php
}, 100 );