Blog Thumbnail

How To Set Up Woocommerce Shipping Method Based On Postcode/Zip Code/Postal Code?

Charging a flat rate as shipping fees can be problematic. What if your customer is located in the next town? Or what if they are located at the other end of the country? In either case, you will end up overcharging or undercharging your customer, leading to dissatisfaction with your customer service. A better way is to opt for a zip code or postal code-based shipping method for your WooCommerce store.

So how does a zip code-based WooCommerce postcode shipping method work? As the name suggests, the customer’s postal code will decide the shipping fees charged.

For instance, if the customer is located within a 50-mile radius, the delivery can be free of cost. For the 100-mile mark, you can charge a standard rate of $2. Increase this incrementally based on how far away the customer is located from your store or warehouse.

In this post, we will walk you through all the steps you need to know to set up a WooCommerce shipping zone based on postal codes.

How to Set Up WooCommerce Shipping Method Based on Zip Code?

The Flat Rate Shipping Method WooCommerce Plugin is a great way to set up shipping charges as per your terms and conditions. With it, you can create advanced-level shipping methods so that the practical requirements of your online store can be fulfilled.

In this how-to guide, we will tell you how to set up shipping methods on your WooCommerce store based on your customer’s zip code or postal code.

Prerequisite: Install the Advanced Flat Rate Shipping Method WooCommerce Plugin on your WooCommerce store.

Part 1: Add Shipping Method

Click on ‘Add New Shipping Method’.

Add new shipping method menu

The shipping method configuration form will look like this:

Add new shipping method settings

Part 2: Add Rules to the Method

To add a rule to a method, simply click on Add Rule. It will look like this:

Add new shipping method rules

Advanced Flat Rate Shipping methods allow you to add multiple rules by using this window. Using these rules lets you efficiently manage shipping charges according to country, state, postcode, and zone. A simple WooCommerce method can’t handle these rules or have such functionality.

Case 1: Add shipping rules as per the specific country zip code

You can fix shipping charges for the deliverable items by using the postcode for the particular country. The method for the same is straightforward to use and highly valuable.

Choose a country and fill a postal code by creating two separate rules in the same method:

Shipping rule based on the specific country & postcode

Case 2: Add shipping rules as per the multiple countries zip codes:

Sometimes customer requirements may arise in different countries. That’s why our advanced shipping method allows you to make rules by using the zipcodes of multiple countries.

By deciding your rules, you can easily handle shipping charges within the same country and in different ones.

To see how you can add shipping rules, take a look at the image below:

Shipping rule based on the specific state & postcode

Case 3: Add shipping rules as per the state’s zip code

Shipping rules may vary from state to state within the same country. To meet the requirements of different customers, you must be able to apply rules as per the real-life needs of your store. The process is similar to adding country zip codes; the only difference is that here you will be selecting different states for the same country.

Case 4: Add shipping rules as per a Zone Containing Zipcodes

Shipping rule based on the specific shipping zone & postcode

You will need to create a shipping Zone, which contains zip codes of different geographical areas. So, let us first tell you how to make a zone.

Steps to Create a Zone:

1. Select ‘Manage Shipping Zones’

Manage shipping zone menu

2. Now, select Add Shipping Zone, or select Add Shipping method, and give give a meaningful name to your zone regions, and select the option as shown in this figure:

Create postcode based shipping zone

Now select the desired country and enter the postal codes to create a zone.

Case 5: Add the shipping charges as per the user’s zip code

If you want to give a specific user special treatment, applying shipping charges exclusively for that user is not possible using WooCommerce. But with this plugin, you can do so. Just add one shipping rule as per the user’s postcode or user type and another, defining the user role. That’s it.

Shipping rule based on the specific user role & postcode

Case 6: Add the shipping charges as per the category of a product Postcode

To apply a different shipping charge on a particular product for a region that has a specific postcode, you can utilize the following procedure.

Shipping rule based on the specific category's product & postcode

Case 7: Add the shipping charges as per the quantity of the items postcode

Advanced Shipping Methods allow storekeepers to fix the shipping charges according to the quantity of the product too. It is helpful in inter-country shipping, where airplane services are charged based on a product basis. See how it’s done:

Shipping rule based on the specific product's quantity & postcode

If you find any difficulty while implementing these rules, you can contact us directly or comment here.

Please note that it is essential to have the Advanced Flat Rate Shipping method WooCommerce Plugin installed on your WooCommerce store.

If you need any assistance with Custom WooCommerce Plugin Development, feel free to reach out to us at MultiDots. They are one of the WordPress VIP partners and parent company of DotStore.


How do I add a postcode in WooCommerce?

There isn’t a typical way to “add a postcode” in WooCommerce. Instead, you’ll often specify postcodes when setting up WooCommerce shipping zones or methods. This can be done using plugins like the Flat Rate Shipping Method for WooCommerce by DotStore, where you can specify postcodes in the rules for a specific shipping method.

How do I calculate shipping by zip code in WooCommerce?

You can calculate the shipping tab by zip code in WooCommerce by utilizing the “Advanced Flat Rate Shipping plugin, creating a shipping address method, and setting up rules based on postcodes. You can define different shipping costs for different postcode ranges enabling dynamic shipping calculation.

How do I set shipping cost based on location in WooCommerce?

Shipping costs based on location can be set in WooCommerce by adding shipping zones and applying specific methods and rates to each zone. To set up, log in to your WordPress dashboard > WooCommerce and then click the add shipping zone button. There you can add the shipping cost rules based on the user’s location.

How do I restrict postcode in WooCommerce?

You can restrict certain postcodes from being eligible for shipping location by setting a rule in your shipping method with the “Advanced Flat Rate Shipping Method for WooCommerce”. This can block specific postcodes, providing you with greater control over your shipping areas.

How do I create a shipping method in WordPress?

WordPress itself doesn’t offer a native way to create shipping methods. Instead, you would typically use the WooCommerce plugin to add e-commerce functionality to your WordPress site. Within WooCommerce, you can set up various types of shipping methods, and configure them based on your requirements.

Tag: , , ,
Category: Flat Rate Shipping, table rate shipping, Woocommerce, WooCommerce Shipping
Author Pic

About Nimesh Patel

I am a Product Marketer and Growth hacker with expertise in the areas of Digital marketing; Search engine optimization (SEO), Email Marketing, Paid Campaigns on Facebook and Twitter, Content development strategies, Competitive Research & Analysis. Nimesh is Product Manager at

  • Author Robin-7738 profile picture
    Robin says:

    does this work with Canadian postal codes that have letters in them?

    • Author The Dotstore-7737 profile picture
      The Dotstore says:

      Hi Robi,

      Yes, Canadian postal codes are supported to Flat Rate Shipping method WooCommerce Plugin.

      Thank you,