disciple-tools-theme icon indicating copy to clipboard operation
disciple-tools-theme copied to clipboard

Mapping: Google API key is not used in custom filter dialog

Open cairocoder01 opened this issue 3 months ago • 4 comments

Describe the bug When a Google API key is added for mapping, it is correctly used on the contact/post detail page for searching locations. However, when creating a custom filter on the Location field, the input is using the DT API /wp-json/dt/v1/mapping_module/search_location_grid_by_name instead of https://maps.googleapis.com/maps/api/place/js/AutocompletionService.GetPredictionsJson

To Reproduce Steps to reproduce the behavior:

  1. Add Google API key for Mapping
  2. On Contact list page, click "Create custom filter"
  3. Select location field
  4. Search for "Bourj Hammoud, Lebanon" and monitor network traffic

Expected behavior Custom filter location search should use Google geocoding service and thus return "Bourj Hammoud, Lebanon"

Screenshots If applicable, add screenshots to help explain your problem.

Disciple.Tools Theme:

  • version: 1.62.1
  • setup: single site (WPEngine)

Device and browser (please complete the following information):

  • Device: MacBook
  • OS: macos 14.4.1
  • Browser: Chrome
  • Version: 124.0.6367.158

cairocoder01 avatar May 16 '24 09:05 cairocoder01