SnapAddress is live. 20% off credit packs with code LAUNCH20 at checkout.

WooCommerce Plugin

Stable

Install and configure the SnapAddress WooCommerce plugin for postcode lookup at checkout.

Overview

The SnapAddress WooCommerce plugin adds automatic UK postcode lookup to your checkout page. Customers type their postcode, select their address from a dropdown, and the address fields are populated automatically.

The plugin supports both the classic WooCommerce checkout and the newer Checkout Blocks.

Requirements: WooCommerce 8.0+, WordPress 6.0+, and PHP 7.4+. WooCommerce must be installed and active.

Installation

The plugin is free on the WordPress plugin directory.

From your WordPress admin

  1. Go to Plugins > Add New and search for SnapAddress
  2. Click Install Now, then Activate

If search doesn't surface the plugin yet (the directory can take a couple of weeks to index a new listing), install it from the plugin listing or use the manual upload below.

Manual upload

  1. Download the plugin ZIP
  2. Go to Plugins > Add New > Upload Plugin
  3. Choose the ZIP file and click Install Now
  4. Click Activate

Configuration

  1. Go to WooCommerce → SnapAddress
  2. Tick Enable autocomplete (on by default)
  3. Enter your API key (get one from the dashboard)
  4. Click Save changes, then Test connection to confirm the key and see your remaining credits

That's all you need to do. The plugin adds the address lookup field to your checkout automatically.

Settings reference

SettingDescriptionDefault
Enable autocompleteTurn the checkout address lookup on or offOn
API keyYour SnapAddress API key

A Test connection button on the settings page validates your key and shows your remaining credit balance.

How it works

The lookup is search-first: instead of adding an extra field to an already long form, the search field stands in for the address fields. It appears directly above where the street address would be, and the individual address fields stay hidden until the customer has picked their address.

  1. The customer types a postcode or address (minimum 2 characters) in the lookup field
  2. The plugin calls the SnapAddress API through a nonce-protected WordPress REST route, so your API key stays on the server and is never exposed in the page
  3. Matching suggestions appear in a dropdown; a postcode suggestion expands to the addresses at that postcode
  4. The customer selects their address — the address fields appear, filled in. They can also click Enter address manually at any point to skip the lookup

Each successful API request uses one credit. Because the field searches as the customer types, a single completed checkout search makes several requests — a few suggestion calls, then one retrieval when they pick — so budget roughly two to four lookups per completed address, not one. See how we size packs for a worked example.

A few behaviours worth knowing about:

  • UK only, by design. The lookup appears when the selected country is United Kingdom. For any other country the standard WooCommerce address fields show as normal.
  • Returning customers keep their saved address. If a logged-in customer already has an address on file, the fields show immediately, pre-filled — no extra clicks to check out. The search field stays available above the street address in case they want to look up a different address.
  • Checkout never blocks. If the lookup is unavailable — no credits, network trouble — the plugin shows a brief notice and reveals the standard address fields automatically, so customers can always complete their order.

Checkout Blocks

The plugin fully supports WooCommerce Checkout Blocks. No additional configuration is needed — the postcode lookup field appears automatically in the blocks-based checkout.

Note

The lookup field positions itself directly above the street address field on both checkout types, including customised checkout layouts. If your theme needs it somewhere else entirely, you can pin it to an exact spot — see Positioning the lookup field.

Customisation

Positioning the lookup field

By default the lookup renders directly above the street address field. To place it anywhere else, add an empty element with a data-snapaddress-anchor attribute to your checkout template and the lookup renders inside it:

<div data-snapaddress-anchor="billing"></div>

Use "billing" or "shipping" to position each section's lookup independently. Two things to note:

  • Place the anchor outside the billing/shipping fields container — WooCommerce re-orders the elements inside it, which would move your anchor
  • If more than one anchor exists for a section, the first one on the page wins

Requires plugin version 1.1.0 or later. Works on both the classic checkout and Checkout Blocks.

CSS styling

The plugin renders BEM-style classes you can target for custom styling:

/* The lookup wrapper */
.snapaddress-lookup { }
 
/* The lookup wrapper when the address fields are already visible
   (e.g. a returning customer with a saved address) */
.snapaddress-lookup--prefilled { }
 
/* The postcode / address input */
.snapaddress-lookup__input { }
 
/* The suggestions dropdown */
.snapaddress-dropdown { }
 
/* A single suggestion row */
.snapaddress-suggestion { }
 
/* The "enter address manually" link */
.snapaddress-lookup__manual { }

Hooks and filters

The plugin doesn't currently expose PHP filters or actions — control the position with the data-snapaddress-anchor attribute and the appearance with the CSS classes above.

Troubleshooting

The address lookup field does not appear

  • Confirm the plugin is activated in Plugins > Installed Plugins
  • Check that Enable autocomplete is ticked and an API key is set in WooCommerce → SnapAddress
  • Check the selected country — the lookup only appears when the country is United Kingdom
  • If using a custom theme, ensure the WooCommerce checkout templates aren't overridden in a way that removes the address fields

The address fields are hidden at checkout

This is the search-first design: for new customers the fields stay hidden until an address is selected, keeping the form short. They appear as soon as the customer picks an address, clicks Enter address manually, or — for logged-in customers with a saved address — immediately on page load, pre-filled. If the lookup service is ever unavailable, the fields are revealed automatically so checkout is never blocked.

"Unauthorised" error at checkout

Your API key is invalid or has been revoked. Generate a new key from the dashboard, update it in WooCommerce → SnapAddress, and click Test connection to confirm it works.

No addresses returned for a valid postcode

  • Check your credit balance on the dashboard. When credits run out the lookup field falls back to manual entry, so add a credit pack from the pricing page to re-enable lookups
  • Verify the postcode exists by testing it directly in the API

Uninstalling

Deactivate and delete the plugin from Plugins > Installed Plugins. The plugin does not store any data in your WordPress database beyond its settings, which are removed on deletion.

WooCommerce Plugin | SnapAddress Docs | SnapAddress