The Google Map field in Advanced Custom Fields (ACF) uses Google’s legacy Places API for its address search. Since March 1, 2025, Google no longer lets new Google Cloud projects enable the legacy Places API.
If your API key comes from a new project, the map loads, but as soon as you type an address nothing happens and the browser console shows:
You're calling a legacy API, which is not enabled for your project ... LegacyApiNotActivatedMapError
This plugin fixes that without changing your fields or your saved data:
- Stops ACF from loading the legacy Places library.
- Adds an address suggestions dropdown to the Google Map field, powered by Places API (New).
- Saves the selected place through ACF’s own field methods, so the stored value (address, lat, lng, place_id, street, city, state, post code, country, etc.) has the same format as before.
- Works in wp-admin, in repeater and flexible content rows, and in front-end forms built with
acf_form().
- Supports keyboard navigation (arrow keys, Enter, Escape) and screen readers (ARIA combobox/listbox).
- Shows a clear message right under the field when Google rejects a request (API not enabled, key restricted, domain not allowed, billing off), with a link to Google Cloud Console.
- Uses Autocomplete session tokens, so Google bills each address search as a single session.
No settings page. Activate it and the field works.
Requirements
- Advanced Custom Fields or ACF PRO.
- A Google Maps API key that ACF already uses, with these APIs enabled in Google Cloud Console:
- Maps JavaScript API
- Geocoding API
- Places API (New)
This plugin is not affiliated with or endorsed by WP Engine (ACF) or Google.
External services
This plugin connects to the Google Maps Platform, Places API (New), to show address suggestions and retrieve the selected place’s location in the ACF Google Map field.
- When: only on screens where an ACF Google Map field is shown, and only when a user types at least 3 characters into the field’s search box or selects a suggestion.
- What is sent: the text typed into the search box, the current map center (to rank nearby results first), the site language, an anonymous session token, and the Google Maps API key configured for ACF. Google also receives the usual browser request data, such as the IP address and the page URL (referrer).
- Provider: Google LLC.
- Google Maps Platform Terms of Service: https://cloud.google.com/maps-platform/terms
- Google Privacy Policy: https://policies.google.com/privacy
ACF itself already loads the Google Maps JavaScript API on these screens. This plugin does not add any other external requests.
Contributing
Development happens on GitHub: https://github.com/alexmeanpug/places-autocomplete-for-acf
Bug reports and pull requests are welcome.