<?php
add_action( 'facetwp_scripts', function() {
?>
<script>
(function($) {
$(document).off('click', '.facetwp-type-checkboxes .facetwp-checkbox:not(.disabled)');
$(document).on('click', '.facetwp-type-checkboxes .facetwp-checkbox:not(.disabled)', function() {
var is_checked = $(this).hasClass('checked');
$(this).closest('.facetwp-facet').find('.facetwp-checkbox').removeClass('checked');
is_checked ? $(this).removeClass('checked') : $(this).addClass('checked');
FWP.autoload();
});
})(jQuery);
</script>
<?php
}, 100 );