<?php
// See:
// https://facetwp.com/help-center/facets/facet-types/proximity/#fix-issues-with-the-number-of-autocomplete-resul
// https://facetwp.com/help-center/facets/facet-types/proximity/#limit-autocomplete-results-to-a-specific-country
// https://facetwp.com/help-center/facets/facet-types/proximity/#limit-autocomplete-results-to-specific-place-types
add_filter( 'facetwp_proximity_autocomplete_options', function( $options ) {
$options['componentRestrictions'] = array(
'country' => ['de','nl'], // Limit to Germany and The Netherlands.
// See https://developers.google.com/maps/documentation/javascript/reference/places-autocomplete-service#ComponentRestrictions
// Country codes: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
);
$options['types'] = ['(regions)'];
// See https://developers.google.com/maps/documentation/javascript/supported_types#table3
return $options;
});