Polylang language link: strip FacetWP variables

<?php

// Add the following to functions.php

add_filter( 'pll_translation_url', function( $url, $lang ) {
    if ( false !== ( $pos = strpos( $url, '?' ) ) ) {
        $url = substr( $url, 0, $pos ); // strip out the "?" and everything after
    }
    return $url;
}, 10, 2 );