Title: Cleanup postcode, set county
Last modified: June 12, 2020

---

# Cleanup postcode, set county

 *  Resolved [bootle](https://wordpress.org/support/users/bootle/)
 * (@bootle)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/cleanup-postcode-set-county/)
 * Hi there, many thanks for your simple and very useful plugin.
 * Have just installed it for a company selling gluten free pork pies for delivery
   in UK 😉
 * Two minor points that would polish it for us – one is that people often enter
   their postcode lazily, e.g. yo268ay instead of YO26 8AY so it would be nice if
   the lookup could fill the postcode too. I can see this in the API response for
   yo268ay:
 * {
    “postcode”: “YO26 8AY”, “latitude”: 54.0254, “longitude”: -1.322467, “addresses”:[{“
   formatted_address”: [ “Grange Farm”, “Boroughbridge Road”, “”, “Whixley, York”,“
   North Yorkshire” ], etc….
 * Also, the county is not being set, but again it’s there in the API output:
 *  “locality”: “Whixley”,
    “town_or_city”: “York”, “county”: “North Yorkshire”,“
   district”: “Harrogate”, “country”: “England” },
 * These could be options, default off, in the admin.
 * Again, many thanks for this!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [gazchap](https://wordpress.org/support/users/gazchap/)
 * (@gazchap)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/cleanup-postcode-set-county/#post-12977372)
 * Hey there, bootle 🙂
 * Thanks for the feedback.
 * Tidying up the postcode would be a good improvement, nice idea – I’ll see what
   I can do on that front.
 * Regarding the County field, that should already be being populated. I’ve just
   tried it on my test site and also on a live project that I’ve used my plugin 
   on, and with that postcode the “County (optional)” field is populated with “North
   Yorkshire” for both of the found addresses.
 * If you want to email me with your site URL (email is my username at gmail dot
   com) then I can perhaps look at the County issue for you.
 *  Plugin Author [gazchap](https://wordpress.org/support/users/gazchap/)
 * (@gazchap)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/cleanup-postcode-set-county/#post-12977873)
 * I’ve just pushed out a quick 1.4 update that takes the suggestion about tidying
   up the postcode on board – that should now be in place!
 * Thanks again for the suggestion 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Cleanup postcode, set county’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gazchaps-woocommerce-getaddress-io.
   svg)
 * [GazChap's WooCommerce getAddress.io Postcode Lookup](https://wordpress.org/plugins/gazchaps-woocommerce-getaddress-io/)
 * [Support Threads](https://wordpress.org/support/plugin/gazchaps-woocommerce-getaddress-io/)
 * [Active Topics](https://wordpress.org/support/plugin/gazchaps-woocommerce-getaddress-io/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gazchaps-woocommerce-getaddress-io/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gazchaps-woocommerce-getaddress-io/reviews/)

## Tags

 * [postcode](https://wordpress.org/support/topic-tag/postcode/)

 * 2 replies
 * 2 participants
 * Last reply from: [gazchap](https://wordpress.org/support/users/gazchap/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/cleanup-postcode-set-county/#post-12977873)
 * Status: resolved