• Hello,

    We have the “Attempt to auto-locate the user” setting enabled on our site, but are having the problem that in order for locations to display the user has to refresh the page.

    When the page is first loaded, the browser prompts the user to allow the website to access it’s location. Before the user has a chance to accept (or decline) an AJAX request is made to /wp-admin/admin-ajax.php?lang=en&action=store_search&lat=56.130366&lng=-106.34677099999999&max_results=25&search_radius=50 which isn’t the users location so the search returns false.

    Once the user clicks allow for the browser, and the page is refreshed the same AJAX request is preformed but with the correct lat and lng parameters. The search results and map are then populated correctly.

    How we can get it so the map is populated correctly without the user having the refresh the page after they’ve accepted the “allow location” prompt.

    Note: We’ve tested this with the option “Load locations on page load” both enabled and disabled. We get he same results as above no matter what.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Attempt to auto-locate the user required refresh of page’ is closed to new replies.