Improved Sale Badges for WooCommerce

<?php

add_action( 'wp_head', function() {
?>

<script>
(function($) {
    document.addEventListener('facetwp-loaded', function() {
        $(document).triggerHandler('ajaxComplete');
     });
})(jQuery);
</script>

<?php
}, 100 );