The fastest way to add WooCommerce address autocomplete is the AutoPostcode plugin: install it, paste your API key, and the checkout's billing and shipping fields gain Royal Mail PAF autocomplete automatically. Developers can instead enqueue a small script that binds to the WooCommerce checkout fields — both paths return real UK addresses from ~31M delivery points across ~1.8M postcodes.
Try WooCommerce-style autocomplete now
Type a UK postcode to see the kind of PAF result your shoppers get at checkout:
What's the no-code way to add autocomplete?
Use the AutoPostcode WooCommerce plugin — no code required. It hooks into the standard checkout field IDs and works with most themes and page builders.
- Install and activate the AutoPostcode plugin
- Paste your API key in the plugin settings
- Toggle autocomplete on for billing and shipping
- Place a test order and confirm the dropdown appears
How do I add autocomplete with code?
Prefer full control? Enqueue a small script in your theme that calls your own proxy endpoint and binds to the WooCommerce checkout postcode field:
// functions.php — enqueue on checkout
add_action('wp_enqueue_scripts', function () {
if (is_checkout()) {
wp_enqueue_script('ap-autocomplete', get_stylesheet_directory_uri() . '/js/ap.js', [], '1.0', true);
}
});// js/ap.js — bind to the WooCommerce billing postcode field
document.querySelector('#billing_postcode')?.addEventListener('input', async (e) => {
const pc = e.target.value.trim();
if (pc.length < 5) return;
const r = await fetch('/wp-json/ap/v1/lookup?postcode=' + encodeURIComponent(pc));
const { addresses } = await r.json();
// render addresses into a dropdown, then fill #billing_address_1, #billing_city
});No-code plugin vs custom code
| Approach | Setup time | Best for |
|---|---|---|
| AutoPostcode plugin | ~5 minutes | Most stores |
| Custom JS + REST route | An afternoon | Bespoke checkouts |
Once autocomplete is live, add server-side WooCommerce address validation to catch edge cases, follow the deeper WordPress integration guide, and read the address autocomplete API reference.
A modern, UK-first alternative
AutoPostcode uses the same Royal Mail PAF data as Loqate, Fetchify and Ideal Postcodes, at an affordable per-lookup price and with a WooCommerce plugin that installs in minutes.
Frequently asked questions
How do I add address autocomplete to WooCommerce?
The fastest way is the AutoPostcode WooCommerce plugin: install it, paste your API key, and the billing and shipping fields gain PAF-backed autocomplete automatically. Developers can instead enqueue a small script that binds to the WooCommerce checkout fields.
Is there a no-code option for WooCommerce autocomplete?
Yes. The AutoPostcode plugin adds autocomplete to WooCommerce checkout without touching code — install, activate, add your key, and it hooks into the standard billing/shipping address fields.
Does WooCommerce address autocomplete work with custom themes?
Yes. The plugin binds to the standard WooCommerce checkout field IDs, so it works with most themes and page builders. For heavily customised checkouts you can target your own field selectors with the JS snippet.
Is the address data Royal Mail PAF?
Yes. AutoPostcode is built on Royal Mail PAF, covering ~31M UK delivery points across ~1.8M postcodes, so shoppers pick a real, correctly formatted address.
Will autocomplete slow down my WooCommerce checkout?
No. Lookups are lightweight JSON calls that fire as the shopper types, and results return in well under a second, so the checkout stays fast.
How much does WooCommerce address autocomplete cost?
AutoPostcode is priced per lookup with an affordable UK-first plan, undercutting legacy providers like Loqate, Fetchify and Ideal Postcodes. You only pay for lookups your shoppers actually make.
Ready to get started?
Add Royal Mail PAF-verified UK address lookup to your site in minutes — start free, no card required.
