SnapAddress is launching soon. Join the waitlist for early access and 20% off your first credit pack. Join waitlist →

WooCommerce Plugin

Stable

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

Overview

The SnapAddress WooCommerce plugin adds automatic 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.

Installation

From WordPress.org

  1. In your WordPress admin, go to Plugins > Add New
  2. Search for SnapAddress
  3. Click Install Now, then Activate

Manual upload

  1. Download the plugin ZIP from WordPress.org
  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 > Settings > SnapAddress
  2. Enter your API key (get one from the dashboard)
  3. Click Save changes

That is all that is required. The plugin will automatically add a postcode lookup field to your checkout page.

Settings reference

SettingDescriptionDefault
API KeyYour SnapAddress API key
Button textLabel on the lookup button"Find address"
PlaceholderPlaceholder text in the postcode field"Enter postcode"
Auto-collapseHide the lookup field after an address is selectedOn

How it works

When a customer enters a postcode and clicks the lookup button (or presses Enter):

  1. The plugin calls the SnapAddress API from your server (keeping your API key secure)
  2. Matching addresses are displayed in a dropdown
  3. The customer selects their address
  4. The billing or shipping address fields are automatically populated

The lookup uses one credit per successful request.

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

If you are using a custom checkout layout or a third-party checkout plugin, the SnapAddress field may need manual positioning. See the customisation section below.

Customisation

CSS styling

The plugin uses standard WooCommerce class names. You can target these for custom styling:

/* The lookup wrapper */
.snapaddress-lookup { }
 
/* The postcode input */
.snapaddress-lookup__input { }
 
/* The find button */
.snapaddress-lookup__button { }
 
/* The address dropdown */
.snapaddress-lookup__results { }

Hooks and filters

The plugin provides WordPress filters for advanced customisation:

// Change the button text programmatically
add_filter('snapaddress_button_text', function ($text) {
    return 'Look up address';
});
 
// Modify the API response before populating fields
add_filter('snapaddress_address_data', function ($address) {
    // Add custom field mapping
    return $address;
});

Troubleshooting

Lookup button does not appear

  • Confirm the plugin is activated in Plugins > Installed Plugins
  • Check that an API key has been entered in WooCommerce > Settings > SnapAddress
  • If using a custom theme, ensure WooCommerce checkout templates are not overridden in a way that removes the hook

"Unauthorised" error at checkout

Your API key is invalid or has been revoked. Generate a new key from the dashboard and update the plugin settings.

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.