facetwp fselect label

/**
 * Use a default label in the open fselect dropdown different from the default shown when closed
 * change facetwp-facet-product_categories to name of your facet and Custom Label to the label you want to use
 **/
add_action( 'wp_head', function() { ?>
    <script>
    (function($) {
        $(function() {      
            if ('object' !== typeof FWP) {
                return;
            }
            FWP.hooks.addAction('facetwp/loaded', function() {
                console.log('test');
                $( '.facetwp-facet-product_categories .fs-option:first-of-type .fs-option-label' ).text( 'Custom Label' );
            }, 100 );
        });
    })(jQuery);
    </script>
<?php }, 100 );