Description
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:
- WooCommerce classic checkout (billing and shipping addresses).
- WooCommerce block checkout (the default checkout of recent WooCommerce versions).
- WooCommerce My Account addresses.
- Any other form (Contact Form 7, Gravity Forms, Elementor, custom forms) through the “Custom fields” setting, by ID or CSS class.
Highlights:
- Uses Google’s current Places API (New), with an automatic fallback to the legacy Places API for older keys.
- Fast: Google Maps is only loaded when a visitor first clicks an address field. On a WooCommerce store, the plugin’s small script only loads on the checkout and My Account pages.
- Street lines follow each country’s format (“12 Rue de la Paix”, “Hauptstraße 12”).
- Accessible suggestion list (keyboard and screen readers), with the attribution required by Google.
- Country scope (worldwide or up to 5 countries), suggestion type (addresses, cities, regions, businesses) and site language support.
- No jQuery required.
External services
This plugin connects to the Google Maps JavaScript API (Places library) to provide address autocomplete. This is required for the plugin to work.
The Google Maps script is only loaded when a visitor focuses a supported address field. Nothing is sent to Google before that. After that, the text the visitor types in the address field is sent to Google to get address suggestions, and the details of the selected address are returned to fill the form. The request includes the API key you configure on the settings page and your site’s language and region. Like any script loaded from Google, the request also reveals the visitor’s IP address and browser information to Google.
- Service provider: Google Maps Platform
- Terms of Service: https://cloud.google.com/maps-platform/terms
- Privacy Policy: https://policies.google.com/privacy
Installation
- Upload the plugin files to the
/wp-content/plugins/autocomplete-google-placesdirectory, or install the plugin through the WordPress Plugins screen directly. - Activate the plugin through the Plugins screen in WordPress.
- Open the Google Places admin menu (location-pin icon), enter your Google API key and click Test API key.
- Save. Autocomplete is now active on your address fields.
FAQ
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.
Screenshots
Changelog
3.4.0
- New: Places API (New) support, with automatic fallback to the legacy Places API. Keys created since March 2025, which cannot use the legacy API, now work.
- New: “Google Places API” setting (Automatic, New only, Legacy only).
- New: the “Test API key” button checks both Places API (New) and Legacy and says which one works with your key.
- New: WooCommerce block checkout support (billing and shipping).
- Performance: Google Maps is no longer loaded on every page. It loads only when a visitor first focuses an address field, with Google’s recommended asynchronous loading.
- Performance: on WooCommerce stores without custom fields, the plugin’s script only loads on the checkout and My Account pages. The script is deferred and the styles are inline.
- Performance: fewer Google requests (3 characters minimum, short typing pause, billing sessions).
- Fix: French billing addresses were filled as “12,Rue de la Paix Rue de la Paix”. Street lines now follow each country’s format.
- Fix: the country was not selected for countries whose WooCommerce name differs from Google’s (for example “United States (US)”). Countries are now matched by ISO code.
- Fix: selecting an address on the classic checkout now updates the country and state dropdowns and recalculates shipping.
- Fix: the settings page did not load on WordPress 7.1 (React 19).
- Fix: no more conflict or double loading when the theme or another plugin already loads Google Maps.
- Compatibility: tested with WordPress 7.1 and WooCommerce 11.3. Declares compatibility with WooCommerce High-Performance Order Storage and the Cart & Checkout blocks.
- Compliance: the “Google Maps” attribution required by Google is now shown in the suggestion list.
- Security: the API key format is validated, all settings are validated again before output, and the configuration is safely encoded.
- Security: removed leftover code from another platform and the relative include path.
- Accessibility: the suggestion list works with the keyboard and screen readers. Pressing Enter in the list no longer submits the checkout.
3.3.1
- Update – Compatibility with latest WordPress & WooCommerce versions.
3.3.0
- New: custom field targeting now works with dynamically added fields. A MutationObserver detects address inputs that appear after page load (React/Ajax modals, multi-step forms, dynamically rendered checkouts) and attaches autocomplete to them automatically.
- Improved: auto-filled values are now written in a way that React and other controlled-input frameworks register correctly, so the filled address is no longer reverted on the next render.
3.2.0
- New: multilingual support. The autocomplete now follows your WordPress site language and region (e.g. fr_FR), so suggestions and the predictions UI appear in the visitor’s locale.
- New: “Suggestion type” setting. Choose what Google suggests — street addresses (default), addresses & areas, cities only, regions, or businesses & places.
- New: “Custom fields (Form ID / class)” option. Target address inputs on any form (Contact Form 7, Gravity Forms, custom forms) by ID and/or CSS class, separated by commas. When a suggestion is selected, the matched field is filled with the full street address and nearby city and postcode fields are auto-filled when present. This restores and improves the old “Form ID” targeting from the 1.x line.
3.1.0
- New: choose the autocomplete country scope from the admin settings. Default is Worldwide (works in all of Europe, USA, Canada, Japan and everywhere else); optionally restrict to up to 5 countries (Google’s maximum).
- New: redesigned admin settings screen built with React (WordPress’ bundled wp.element), including a one-click “Test API key” button that verifies your Google Places key live.
- Changed: replaced the bundled CMB2 library with a lightweight custom settings page (saved via the WordPress Settings API). This removes the vendored library entirely.
3.0.0
- Major release.
- Rewrote the front-end script in modern vanilla JavaScript (ES6); removed the jQuery dependency from the script and its enqueue.
- Security: upgraded the bundled CMB2 library from 2.10.1 to 2.12.0 (addresses CVE-2024-1792) and removed the dead root CMB2 loader.
- Security: removed the hardcoded Google Maps API key fallback; the Maps script now loads only when an API key is configured.
- Security: the Google Maps URL is now built with rawurlencode() and escaped with esc_url_raw().
- Hardening: moved the direct-access guard ahead of all includes, removed unused example files, and added a directory-listing guard to /js.
- Added uninstall cleanup of stored plugin options.
- Compatibility: raised the minimum PHP requirement to 7.4 (required by CMB2 2.12.0); updated “Tested up to”.
1.3.4
- WordPress 5.9 version compatibility.


