<?php
// Add the following to your (child) theme's functions.php.
// Note that this will cause a immediate location permission pop-up on page load.
// Some browsers (like IOS Safari) will not store the permission and will ask repeated permission, on every page with a Proximity facet.
add_action( 'wp_head', function() {
?>
<script>
window.addEventListener('DOMContentLoaded', function() {
if ('undefined' !== typeof FWP.hooks) {
FWP.hooks.addAction('facetwp/loaded', function() {
if (! FWP.loaded) {
$('.locate-me').click();
}
});
}
});
</script>
<?php
}, 100);