Skip to content

Address Autocomplete

Swft uses the Google Places Autocomplete API to provide real-time address suggestions as the shopper types their postcode or street address. Selecting a suggestion populates all address fields instantly — street, city, county, postcode, and country.

The autocomplete field replaces the standard address line 1 input. As the shopper types, suggestions are fetched from the Places API restricted to the countries enabled for the merchant. Selecting a result triggers a Place Details lookup that returns structured address components, which Swft maps to WooCommerce billing and shipping field equivalents.

Field mapping:

Places componentSwft field
street_number + routeAddress line 1
subpremiseAddress line 2
postal_town or localityCity
administrative_area_level_2County / state
postal_codePostcode
countryCountry

Address autocomplete is enabled by default for all merchants. To disable it:

{
"modules": {
"addressAutocomplete": false
}
}

To restrict autocomplete to specific countries (recommended — reduces noise for single-market merchants):

{
"modules": {
"addressAutocomplete": {
"countries": ["GB", "IE"]
}
}
}

Swft manages the Google Places API key at the platform level. You do not need a Google Cloud account or a Places API key. Usage is included in all Swft plans.

If the Places API request fails (network error, quota exceeded), the autocomplete field degrades to a standard text input. All address fields remain editable manually, so no shopper is ever blocked.