FacetWP – fix get_search_query() for ajax requests

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

add_filter( ‘get_search_query’, function( $query ) {
if ( function_exists( ‘FWP’ ) && ” == $query ) {
return FWP()->facet->http_params[‘get’][‘s’];
}
return $query;
});

{{/gist}}