| 开发者 | ciricdev |
|---|---|
| 更新时间 | 2026年11月13日 07:02 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
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:
acf_form().places-autocomplete-for-acf folder to /wp-content/plugins/, or install it from Plugins > Add New.You need it if typing in the ACF Google Map search box shows no suggestions and the browser console shows LegacyApiNotActivatedMapError. This usually happens with API keys from Google Cloud projects created after March 1, 2025.
If your project still has the legacy Places API enabled, the field already works, but this plugin moves it to the newer API.
No. Existing values are not touched. New selections are saved in the same format ACF uses.
Google rejected the request, and the message says why. The most common causes are:
Check that Places API (New) is enabled for the project that owns the key, and that the key's website restrictions include your admin domain. Errors from this plugin start with [Places Autocomplete for ACF].
Yes, with the ciricdev_paacf_settings filter:
add_filter( 'ciricdev_paacf_settings', function ( $settings ) { $settings['includedRegionCodes'] = array( 'us' ); return $settings; } );
Available keys: minChars (default 3), debounce in milliseconds (default 250), includedRegionCodes (up to 15 two-letter codes), language (default: site language).
Yes. Use the ciricdev_paacf_request ACF JS filter to adjust the Places API (New) autocomplete request, and the ciricdev_paacf_place_selected action to react when a place is chosen:
acf.addFilter( 'ciricdev_paacf_request', function ( request, field, map ) { request.includedPrimaryTypes = [ 'street_address' ]; return request; } );
Yes. It works with both the free and PRO versions of ACF.