Shipping calculations with NZ postcodes including Rural Delivery

How to create rural shipping rules in WooCommerce based on NZ postcodes

WooCommerce is a great platform for ecommerce (and the best one to use if you have WordPress) but calculating the cost of shipping for New Zealand delivery can be a pain in the neck, particularly if you have to charge extra for rural delivery..

Fortunately, WooCommerce allows you to create Shipping Zones. Each shipping zone can be configured with a Country, Region and Postcode, and you can then define the cost of shipping to that zone. To add postcodes to the zone, you simply enter each postcode in its own line in the postcode field.

Once you have all your zones set up (and in the right order), the customer's address will be compared to each of your shipping zones, starting with the first zone in the list, until it finds one that matches. This is the zone that will be used to calculate shipping for that customer.

The question is - where can you find a list of postcodes to use for your shipping zones?

Fortunately, NZ Post provides a directory of all of the urban postcodes in New Zealand broken down by region. Unfortunately, this list is not in a simple file that you can use to copy and paste postcodes into your shipping zones. In fact, the postcodes for each region are in a different PDF file, making the job of extracting them even more tiresome.

Also unfortunate is the fact that NZ Post whilst also supplies a separate list of all of the rural postcodes (in a single file this time) but these are not broken down by region, or even by island.

Fortunately, it is easy to work out which island a postcode belongs to (rural or urban) since all NZ postcodes over 7000 are in the South Island, and all those below 7000 are in the North Island.

So, how can you extract this data to use in your WooCommerce shipping zones?

Well, you could go through all of the separate urban directories, copy the postcodes from each into a spreadsheet, then combine them with the rural postcodes so you then have a single list of all postcodes in New Zealand. Then, you can probably work out which region each rural postcode belongs to, by comparing them with the urban postcodes for which you already know the region. For example, all postcodes up to and including 0599 are in Northland.

Or, you could simply download the list of WooCommerce postcodes that we've already created. Simply fill out the Postcode Request form on this page, and you'll get a copy emailed straight to you.

And, if you're struggling to create shipping rules that work (whether or not you are planning to use postcodes), then we can help. Believe it or not, we really enjoy setting up shipping rules - the more complex the better. Simply tick the box in the form that says "I need help with my shipping rules" and we'll get in touch.

Postcode request form

Add new comment