facetwp remove search from fselect

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php
/**
** set option to disable fselect search field
**/
add_action( ‘wp_footer’, function() { ?>
<script>
(function($) {
FWP.hooks.addFilter(‘facetwp/set_options/fselect’, function(opts, facet) {
if (facet.facet_name == ‘product_categories’) {
opts.showSearch = false;
return opts;
}
});
})(jQuery);
</script>
<?php }, 100 );
{{/gist}}