If you are using WooCommerce Advanced Shipping, and you want to setup country based shipping rates you can use the ‘country’ condition. BUT if you want to setup the same shipping rate for the multiple countries, that can be a bit of a pain. Specially if you have multiple conditions setup you use. In the ‘Country Based Shipping‘ doc I explain how this can be done without created shipping zones, but it will require more work.
WooCommerce Advanced Shipping – Shipping Zones
Because I know it takes quite some time to do it the alternative way, I’ve created a shipping zones extension for WooCommerce Advanced Shipping. When installing this extension, it will do two things;
1. Create a ‘Shipping zones’ settings page
2. Add a ‘Shipping zone’ condition
Creating shipping zones
To create a shipping zone go to WooCommerce -> Settings -> Shipping zones. Here you will see a overview table with all your created shipping zones. Right now its probably empty, so lets create one by clicking ‘Add Shipping Zone’.
After clicking the button you will see a screen similar to this;
If any value within a shipping zone matches with the user, the ‘shipping zone’ condition will match as TRUE
The note above is important to remember. For example, if you set a couple of ‘zipcodes’ in here, you DO NOT want to set a ‘country’ here. Instead set a ‘country’ condition over at the shipping method. If you do set a country in the ‘Countries’ field, the user will get the shipping method when his country is set to that value, even if his zipcode doesn’t match.
In the ‘countries’ field you can select a bunch of countries. There are two ways to select a country;
1. You can click on the field, a popup opens with the available countries
2. Click on the field and start typing the name of the country you want to add, it will automatically filter the relevant countries out for you.
Configuring ‘states’ is about the same as countries. You can click on the field and start typing to find your state, or select it from the drop down. Keep in mind that if you want to configure a state shipping zone, you should *NOT* set a ‘country’ in the shipping zone, instead set a country condition at the shipping method.
Zipcodes can be separated by a comma ‘,’ or a new line.
The zipcodes within the ‘zipcodes’ field have a different matching method than the regular zipcode condition. Zipcodes that are given in there are matching when the user zipcode ‘starts with’ the given value. For example, if I fill in ‘1000’, every zipcode that starts with that number will be matched (10005, 1000403, 1000ABC). What wouldn’t match is (1500, 1005, 2000).
You can also set zipcode ranges. To do that you can set two values separated by a dash ‘-‘, note no spaces in between. For example, you can set the value ‘100-200’, this will match all zipcodes between 100 and 200.
How to get the Shipping Zones extension
Right now the only way to get the shipping zones extension is by request via my contact form at http://jeroensormani.com/woocommerce-advanced-shipping/support/. I might release it later on Ace Plugins, CodeCanyon or somewhere else, but that is yet to be determined.
A small example of the shipping zones;