facetwp limit proximity

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php

add_filter( ‘facetwp_proximity_autocomplete_options’, function( $options ) {
$options[‘types’] = [‘(regions)’]; // see https://developers.google.com/places/supported_types#table3
$options[‘componentRestrictions’] = array(
‘country’ => ‘us’, // see https://developers.google.com/maps/documentation/javascript/reference/places-autocomplete-service#ComponentRestrictions
);
return $options;
});

{{/gist}}