[WordPress] 外掛分享: Places Autocomplete for ACF

首頁 › 外掛目錄 › Places Autocomplete for ACF
WordPress 外掛 Places Autocomplete for ACF 的封面圖片
10+
安裝啟用
—
尚無評分
4 天前
最後更新
—
問題解決
WordPress 6.0+ PHP 7.4+ v1.0.0 上架:2026-11-11

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Places Autocomplete for ACF」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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.

延伸相關外掛

文章
Filter
Mastodon