Update: Version 2.2 released on 10th February 2022, on the WordPress plugin repository.
This, my third WordPress plugin (and also my third WooCommerce plugin, apparently I really like doing stuff with WooCommerce!) adds a postcode lookup tool to the checkout in WooCommerce 3.x that lets your UK-based customers quickly fill in their billing/shipping addresses based on their postcode.
It utilises the great getAddress.io API for the postcode lookup, and as such requires an API key for their service. I’d always recommend the £10 per month pricing plan, simply because it offers the best value, but they have a number of others available.
- Adds postcode lookup for both billing and shipping addresses
- Administrators can turn off the lookup for either address, if needed
- (v1.1) Uses an internal cache for each customer to prevent repeated calls for the same postcode eating up API usage limits
- Correctly uses the WooCommerce “locale” system to show and hide the lookup button when appropriate
- Has full internationalisation (i18n) and localisation (l10n) support – so if you want to translate the plugin into your own language, please get in touch!
The plugin adds a Find Address button next to the postcode field, and moves the Postcode field so that it is the first field filled in after selecting United Kingdom as the country.
When the Find Address button is clicked, the user is presented with a menu of available addresses:
In the WordPress back-end, administrators have the following settings available:
As with all WordPress plugins, you just need to drop the plugin folder into your wp-content/plugins folder and then activate the “GazChap’s WooCommerce getAddress.io Postcode Lookup” plugin.
I’m using WordPress 5.1 and WooCommerce 3.5.5 – please let me know in the comments if it doesn’t work on other versions. I believe it requires at least WooCommerce 3.0.0.
This plugin is open-source – view the source code on the GitHub repository.