Linux 软件免费装
Banner图

Autocomplete Google places

开发者 chroudakais
更新时间 2026年11月10日 04:23
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

autocomplete address autocomplete google address autocomplete autocomplete google address

下载

3.1.0 3.3.0 3.4.0

详情介绍:

This plugin adds Google Places address autocomplete to your address fields. When a customer starts typing an address and picks a suggestion, the plugin fills the street, city, state, postcode and country fields for them. You only need your own Google API key. Supported fields: Highlights:

安装:

  1. Upload the plugin files to the /wp-content/plugins/autocomplete-google-places directory, or install the plugin through the WordPress Plugins screen directly.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Open the Google Places admin menu (location-pin icon), enter your Google API key and click Test API key.
  4. Save. Autocomplete is now active on your address fields.

屏幕截图:

  • Address fields auto-filled after selecting a Google Places suggestion.

升级注意事项:

3.4.0 Places API (New) support with automatic fallback, WooCommerce block checkout support, much faster pages (Google Maps loads only when needed) and a fix for French addresses. No action needed; enabling "Places API (New)" on your Google key is recommended.

常见问题:

Is this a paid plugin?

No, it is completely free.

Do I need a Google API key?

Yes. In the Google Cloud Console, enable the Maps JavaScript API and Places API (New) for your key, then enter it on the Google Places settings page. Restrict the key to your website (HTTP referrers) so nobody else can use it.

My key worked before. Do I need to change anything?

No. In the default "Automatic" mode the plugin tries Places API (New) first and falls back to the legacy Places API when your key is not enabled for the new one. The Test API key button shows which API works with your key. Enabling Places API (New) on your key is recommended, because Google no longer offers the legacy API to new customers.

Which fields are supported?

WooCommerce classic and block checkout billing and shipping addresses, and My Account addresses. When an address is selected, address line 1, city, state, postcode and country are filled automatically, and WooCommerce recalculates shipping.

Can I use it on custom form fields?

Yes. In the "Custom fields (Form ID / class)" setting you can target address fields on most forms (Contact Form 7, Gravity Forms, Elementor, and other HTML forms) by ID and/or CSS class. Fields added later by JavaScript (Ajax, React or Vue forms, modals, multi-step forms) are detected automatically.

My checkout is on a custom page and autocomplete does not appear.

On WooCommerce stores, the script loads on the pages WooCommerce reports as checkout or My Account. For a custom checkout page, add this to your theme or a code snippets plugin: add_filter( 'autocomplete_gp_load_on_page', '__return_true' ); You can also add your field in the "Custom fields" setting, which loads the script on every page.

How can I reduce the number of Google requests?

Suggestions are requested after 3 characters, with a short pause while typing, and Google sessions are used so a completed address is billed as one session. To wait for more characters: add_filter( 'autocomplete_gp_min_chars', function () { return 4; } );

Does it still require jQuery?

No. The front-end script is pure JavaScript.

更新日志:

3.4.0 3.3.1 3.3.0 3.2.0 3.1.0 3.0.0 1.3.4