This guide explains every setting inside the Autocomplete Address & Location Picker for WooCommerce plugin. Follow it to configure Google Maps, autocomplete, map picker, customer location, and all advanced features.

π Google API Key Setup
Google Maps requires an API key with billing enabled.
This key powers:
- Address autocomplete
- Map display
- Location picker
- Reverse geocoding
- Customer location detection
Follow the steps below to generate and configure your Google API key.
β Step 1: Enable Billing
Before anything else, billing must be active.
Go to:
https://console.cloud.google.com/project/_/billing/enable
Select or create a project and enable billing.
β Step 2: Create or Select a Google Cloud Project
- Go to: https://console.cloud.google.com/
- Click the project selector.
- Choose New Project or select an existing one.
- Name your project (e.g., βmywebsite.comβ).
β Step 3: Enable Required APIs
Navigate to: APIs & Services β Library
Enable these APIs:
Required:
- Places API (New)
- Maps JavaScript API
- Geocoding API
- Maps Embed API
Note for existing users:
If your Google Cloud account is older, you may also see:
- Places API (Legacy)
This is normal. Keep reading for guidance.
β Step 4: Create an API Key
- Go to APIs & Services β Credentials
- Click Create Credentials β API Key
- A popup will show your key
- Click Restrict Key
β Step 5: Restrict the API Key (High Security)
Application Restrictions:
Select: HTTP referrers (web sites)
Add the following formats:
https://example.com/*
http://example.com/*
example.com/*
*.example.com/*
API Restrictions:
Select: Restrict key
Enable:
- Places API (New) β recommended
- Maps JavaScript API
- Geocoding API
- Maps Embed API
Click Save.
β Step 6: Add the API Key to Your Plugin
In WordPress β WooCommerce β Settings β Autocomplete Address
Paste your API key into:
Google API key
Save changes.
π§ Google API Type β (NEW vs LEGACY)
Google now provides two versions of the Places API:
- Places API (New) – Recommended
- Places API (Legacy)
Which one should you select?
β New Users (2025 and forward)
β Select: Places API (New)
This is the version Google now recommends for all new API projects.
It provides:
- Faster autocomplete
- Better accuracy
- Updated structured address data
- Improved session token handling
- Modernized endpoint:
places.googleapis.com
If you created your Google project recently, always choose this option.
β Existing Users (Older Google Cloud Projects)
If your project was created years ago, you may see both APIs:
- Places API (New)
- Places API (Legacy)
This is normal.
Google keeps both APIs available to maintain compatibility during migration.
Which one should you choose?
Option A – Choose Places API (New)
If:
- Your autocomplete works correctly with it
- You want faster performance
- You want the most future-proof option
Option B – Choose Legacy
If:
- Your existing API calls were built on the Legacy version
- Switching to “New” causes errors
- Your autocomplete suddenly stops working with “New”
The plugin fully supports both versions – choose whichever works best with your Google Cloud account.
βοΈ Billing & Shipping Address Autocomplete
Enable autocomplete separately for:
- Billing Address
- Shipping Address
When enabled, Google address suggestions appear as the user types.
π Country Restrictions
Limit autocomplete suggestions to specific countries.
- You may select up to 5 countries.
- This improves accuracy and reduces irrelevant suggestions.
Example:
USA, Canada, UK, Germany.
π Address Format
Choose how addresses should be inserted into WooCommerce fields:
- Number + Street Name
- Street Name + Number
Pick the format appropriate for your region.
πΊοΈ Map Settings
Enable the map to show an interactive Google Map at checkout.
β Enable Map
Turns on the map display.
β Map Zoom
Controls how close the map appears (0β22).
Recommended: 17β19 for cities.
β Center Map
Set default map center with latitude + longitude.
How to get coordinates:
Right-click on any location in Google Maps β βWhatβs here?β
π Map Position
Choose where the map appears:
- Before address fields (recommended)
- After address fields
π Location Picker (Drag the Pin)
When enabled, customers can:
- Drag a pin on the map
- Automatically update the address fields
- Provide exact delivery coordinates
Location Picker Options:
- Update address only
- Update coordinates only
- Update address and coordinates β recommended
This ensures the address is accurate AND GPS-precise.
π‘ Coordinates in Orders
Enable this to save:
- Latitude
- Longitude
- A clickable βView on Google Mapsβ link
Great for:
- Delivery drivers
- Dispatching apps
- Route optimization
- Couriers and restaurants
Coordinates appear in:
- Admin order details
- Email notifications (optional)
- Driver apps that integrate with WooCommerce
π Customer Location (GPS Auto-Detect)
Two options:
β Enable βUse customerβs current locationβ button
Adds a button customers can tap to auto-fill their exact location.
β Auto-select customer location
Automatically attempts to detect location on checkout load.
Works best on mobile devices with GPS.
π Debug Logging
Enable this only when debugging.
It prints logs to browser console:
- API responses
- Address components
- Map errors
- JS execution steps
Do not leave enabled on production unless needed.
β οΈ Important Notes About Caching & Optimization
Google Maps will NOT load if your site:
- Caches the checkout page
- Combines JavaScript files
- Defers JavaScript
- Minifies external Google scripts
- Uses Cloudflare Rocket Loader
- Uses aggressive performance plugins
Make sure to:
- Disable caching on /checkout page
- Exclude Google Maps scripts from minification
- Disable combine/minify/defer JS on checkout
- Exclude checkout from Cloudflare HTML caching
π Your Setup Is Complete!
You are now fully configured with:
- Google Places API (New)
- Autocomplete for WooCommerce
- Map-based location picker
- GPS customer location
- Accurate coordinates saved to orders
- Full API restriction security