# WooCommerce Pincode/ Zipcode Checker – User Guide

Source: https://www.wecreativez.com/document/woocommerce-pincode-zipcode-checker-user-guide/

> A complete, step-by-step guide to WooCommerce Pincode/ Zipcode Checker: store and product level setup, zones, matching rules, messages, CSV import, marketplace support, REST API and troubleshooting.

:tag[blue][v4.0.0] :tag[gray][WordPress 6.4+] :tag[gray][WooCommerce 7.8+] :tag[gray][PHP 8.0+] :tag[green][HPOS Ready] :tag[green][Checkout Blocks Ready]

WooCommerce Pincode/ Zipcode Checker lets shoppers check whether you deliver to their pincode or zipcode before they pay. It shows an estimated delivery date and can stop orders to areas you do not serve. This guide covers version 4.0.0.

## Features

- **Delivery zones** made of exact postcodes, numeric ranges, wildcards and regular expressions, each with its own delivery time and note. Zones are checked in the order you set.
- **Product and category rules**: follow the store setting, use chosen zones and postcodes of their own, or skip the check.
- **Checker** on product, cart and checkout pages, or anywhere with a shortcode or the **Pincode Checker** block. It follows the fonts, colours and buttons of your theme.
- **Location popup** that asks visitors for their postcode when they arrive, with a button that shows the chosen postcode and opens the popup again.
- **Undeliverable products** can be locked or hidden once a shopper enters a postcode.
- **Shop badges** on product lists.
- **Estimated delivery date** with non-delivery weekdays and an order cut-off time.
- **Checkout rules** for the classic and block checkout, including hiding payment methods such as cash on delivery.
- **Dashboard** with lookup analytics and a postcode tester.
- **CSV import and export** (12,000 postcodes in a few seconds), a product bulk editor and WP-CLI commands.
- **Marketplace support**: vendors of Dokan, WCFM Marketplace and MultiVendorX can set the delivery area of their own products.
- **Automatic updates** with a WeCreativez license key or an Envato purchase code.
- **Developer friendly**: PHP hooks, JavaScript hooks, a REST API and template overrides.
- Works with page caching, High-Performance Order Storage (HPOS) and the cart and checkout blocks. RTL ready and translation ready.

## Requirements

| Software | Minimum version |
| --- | --- |
| WordPress | 6.4 |
| WooCommerce | 7.8 |
| PHP | 8.0 |

WooCommerce must be installed and active.

## Installation

1. In WordPress, go to **Plugins → Add New → Upload Plugin**.
2. Choose the plugin zip file and click **Install Now**.
3. Click **Activate**.
4. Open **Pincode Checker → Zones** and create your first zone.

> **Important:** Create your zones right after activation. By default, products without their own rules are checked against all active zones, and **Stop the order** is switched on. With no zones, no postcode matches, so checkout is blocked for every shippable product.

## Quick start

1. **Create a zone.** Go to **Pincode Checker → Zones → New zone**. Enter a name such as "Delhi NCR", the delivery time in days and the postcodes.
2. **Choose the product rule.** In **Settings → Display**, set **Products without their own settings**. For most stores, **Check all zones** is right.
3. **Place the checker.** On the same tab, choose the **Position on product pages**.
4. **Adjust the messages.** Open **Settings → Messages**.
5. **Test it.** On the **Dashboard**, use **Test a postcode** to see what a shopper gets.

## Admin screens

All screens are under the **Pincode Checker** menu. By default you need the `manage_woocommerce` capability (Administrator or Shop Manager), and `manage_options` to manage the license. Developers can change the first with the `wpzc_manage_capability` filter.

![The menu in the plugin header](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/01-header-menu.avif)

| Screen | Use it to |
| --- | --- |
| Dashboard | See totals and analytics, and test postcodes |
| Zones | Create and manage delivery zones |
| Products | Change product delivery settings, one by one or in bulk |
| Import / Export | Move postcodes and product settings with CSV files |
| Settings | Control display, popup, messages, appearance, checkout and more |
| License | Activate updates and support |

You can also switch screens from the **⋮** menu in the plugin header. **View shop** next to it opens your store.

## Delivery zones

A zone is a group of postcodes you deliver to, with a delivery time and an optional note. Open **Pincode Checker → Zones**.

![The Zones screen](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/04-zones.avif)

![The menu of a zone card](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/05-zone-card-menu.avif)

Each zone card shows its status, note, number of postcode rules, delivery days, **Used by n** (products and categories that use it) and when it was last changed. Use the search field and the **All / Active / Inactive** filter to find a zone.

### Create a zone

1. Click **New zone**.
2. Fill in the fields, then continue to the zone editor.

| Field | Description |
| --- | --- |
| Name `Required` | For example "Delhi NCR" or "Rest of India". |
| Delivery time (days) | Used for postcodes without their own value. |
| Note | For example "Cash on delivery available". |
| Active | Only active zones are used. |

![The New zone dialog](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/06-zone-new.avif)

### Edit a zone

Open a zone to manage it.

![The zone editor](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/07-zone-editor.avif)

![Editing a postcode rule](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/08-postcode-edit.avif)

- **Add postcodes:** type or paste postcodes, one per line or separated by commas. Optionally set **Days** and a **Note** that apply only to the postcodes you are adding. **From file** reads a `.txt` or `.csv` file. The answer tells you how many were added, how many were skipped as duplicates and which lines were not understood.
- **Find postcodes:** search the list, or filter it by type.
- **Edit one postcode:** give it its own delivery time or note. A postcode that shows **Zone (n)** or **Zone note** in grey text uses the value of its zone.
- **Delete postcodes:** delete several selected rows with **Delete selected**, or everything with **Delete all**.
- **Zone details:** change the name, delivery time, note and active switch, then click **Save**. The button stays disabled until something changes.
- **Import**, **Export**, **Duplicate** and **Delete** are at the top of the screen.

The postcode list shows 50 rows per page.

### Manage the zone list

The menu on each zone card offers:

- **Edit**
- **Activate / Deactivate**
- **Duplicate**: creates an inactive copy with the same postcodes
- **Move up / Move down**: changes priority (available when no search or filter is applied)
- **Export postcodes**: downloads the postcodes as a text file
- **Delete**: removes the zone and its postcodes. This cannot be undone.

The page header has **Export all** and **New zone**.

### Change the order with drag and drop

While no search or filter is active, pick up a card anywhere except on its buttons and menu, and drop it in a new place. The order is saved at once. On a touch screen, press and hold for a moment first so the page can still scroll. Press **Esc** to put the card back.

> **Note:** Zones are checked from the first to the last. When several zones match a postcode, the zone listed first wins.

## Postcode formats

| Format | Example | Matches |
| --- | --- | --- |
| Exact | `110001` | Only that postcode |
| Numeric range | `110001...110099` | Every number from the start to the end |
| Single-character wildcard | `1100??` | `?` stands for exactly one character |
| Open wildcard | `SW1*` | `*` stands for any number of characters |
| Regular expression | `/^11\d{4}$/` | Postcodes matching the expression |

How postcodes are read:

- Spaces are removed and letters are converted to capitals, so `sw1a 1aa` and `SW1A1AA` are the same.
- Separate several entries with new lines, commas or semicolons.
- Lines starting with `#` are ignored.
- Both ends of a range need the same number of digits, and ranges work with numbers only.
- A regular expression starts and ends with `/` and is not case sensitive. It must match the **whole** postcode: `/46\d{4}/` matches `460001`, but `/46/` does not.

Entries that cannot be read are skipped, and the plugin tells you which ones.

## Product and category rules

Every product and product category has one of three delivery settings.

| Setting | Effect |
| --- | --- |
| `Store default` | Follows the store setting in **Settings → Display** |
| `Custom areas` | Uses only the zones and postcodes you choose |
| `No delivery check` | No check. The checker is hidden and every postcode is allowed |

### Set up one product

1. Edit the product in WooCommerce.
2. In **Product data**, open the **Delivery area** tab.
3. Choose a setting. For **Custom areas**, fill in:
   - **Zones**: the zones that deliver this product. Inactive zones are shown with a dashed outline.
   - **Postcodes**: postcodes of this product only.
   - **Days** and **Note**: apply to these postcodes only. Zones keep their own.
4. Update the product.

![The Delivery area tab in Product data](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/13-product-delivery-tab.avif)

The postcode box shows at most 300 postcodes. When there are more, the screen says so and removes nothing unless you tick **These are all the postcodes**.

> **Note:** A **Custom areas** product with no zones and no postcodes has nothing to check against, so the plugin ignores it and moves on to the categories of the product, then to the store setting. See [How a postcode is decided](#how-a-postcode-is-decided).

### Set up a category

Go to **Products → Categories**, add or edit a category and use the **Delivery area** fields. The options are the same.

![The Delivery area fields of a product category](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/14-category-delivery.avif)

### Bulk edit products

Open **Pincode Checker → Products**.

![The Products screen](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/09-products.avif)

![The bulk actions bar](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/10-products-bulk-bar.avif)

![Setting zones for several products at once](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/11-products-bulk-zones.avif)

![Editing the delivery settings of one product](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/12-product-quick-edit.avif)

- Search by name or SKU, filter by category, and filter by setting: **All**, **Store default**, **Custom areas** or **No delivery check**.
- Change the setting of one product with the dropdown in its row. It saves at once.
- Use **Quick edit** to change the setting, zones, own postcodes, days and note in one dialog.
- Select several products to change their **Zones** (add, replace or remove), set **No delivery check**, or **Reset to default**.
- Show 20, 50 or 100 products per page. Your choice is remembered.

Up to 200 products can be changed in one request. Choosing **Custom areas** for a product without zones or postcodes opens the quick edit dialog first.

## How a postcode is decided

When a shopper checks a postcode, the plugin looks for the **nearest rule that applies to the product**. Think of it as a ladder. It starts at the top, and the **first step that applies decides the answer**. The steps below it are not looked at.

### The ladder

| Step | Question | If yes |
| --- | --- | --- |
| 1 | Is the product **virtual**, and is **Virtual products** switched on? | No check. Every postcode is allowed |
| 2 | Is the product set to **No delivery check**? | No check. Every postcode is allowed |
| 3 | Is the product set to **Custom areas** (with at least one zone or postcode)? | **Only** its own postcodes and zones decide. No match means not deliverable |
| 4 | Is one of its categories, or a parent category, set to **Custom areas**? | **Only** the postcodes and zones of those categories decide |
| 5 | None of the above | The store setting **Products without their own settings** decides |

The store setting in step 5 has three options:

| Option | Result |
| --- | --- |
| Check all zones | Deliverable where any active zone matches |
| Not deliverable | Only products and categories with their own zones or postcodes can be delivered |
| Do not check | The checker is hidden and every postcode is allowed |

Inside steps 3 and 4, the product's **own postcodes are tried first**, then its zones from the first to the last.

### Examples

Imagine a store with three active zones:

| Zone | Postcodes | Delivery time |
| --- | --- | --- |
| Delhi NCR | `110001...110099` | 2 days |
| Mumbai Metro | `400001...400099` | 3 days |
| Chennai | `600001...600099` | 4 days |

The store setting **Products without their own settings** is **Check all zones**.

**Example 1: A plain T-shirt (Store default)**

Nothing is set on the product or its categories, so the plugin reaches step 5.

- Shopper enters `400005`: Mumbai Metro matches. **Deliverable in 3 days.**
- Shopper enters `560001`: no zone matches. **Not deliverable.**

**Example 2: A Denim Jacket set to Custom areas with the zones Delhi NCR and Chennai**

The product has its own list, so step 3 decides and the store setting is never used.

- `600001`: Chennai matches. **Deliverable in 4 days.**
- `400005`: Mumbai Metro is an active zone, but this jacket does not use it. **Not deliverable.**

**Example 3: A Backpack set to Custom areas with the zone Delhi NCR and its own postcode `302001` (4 days)**

The own postcodes are tried first, then the zones.

- `302001`: matches the own postcode. **Deliverable in 4 days.**
- `110001`: no own postcode matches, then Delhi NCR does. **Deliverable in 2 days.**
- `400005`: **Not deliverable.**

**Example 4: A Sneakers product in the category Footwear**

The category **Footwear** is set to **Custom areas** with the zones Delhi NCR and Mumbai Metro. The Sneakers product itself is set to **Store default**.

- The product has no rules of its own, so step 4 uses the category. `400005` is **deliverable in 3 days**, and `600001` is **not deliverable**.
- If you now set Sneakers to **Custom areas** with only Chennai, step 3 takes over and the category is ignored. `600001` is deliverable and `400005` is not.

**Example 5: An e-book (virtual) and a Gift card (No delivery check)**

- The e-book is virtual, so step 1 allows every postcode and the checker is hidden.
- The Gift card is set to **No delivery check**, so step 2 does the same.

**Example 6: A product set to Custom areas, but no zone or postcode chosen**

There is nothing to check against, so the plugin ignores this setting and continues with step 4 and step 5. With the store setting **Check all zones**, it behaves like Example 1.

### When two rules match the same postcode

- In one list, **exact** wins over **range**, range over **wildcard**, and wildcard over **regular expression**.
- When several zones match, the zone listed **first** on the Zones screen wins. Use **Move up** and **Move down** to change the order.

For example, if the postcode `110001` is in Delhi NCR (2 days) and also in a zone listed after it (5 days), the shopper sees 2 days.

### Good to know

- A check without a product (for example, the shortcode on an ordinary page) looks at all active zones.
- An empty or invalid postcode never stops anything, because the shop cannot tell yet where the order goes.
- Only **active** zones are used. Inactive zones are skipped, even when a product has chosen them.

## Settings

Open **Pincode Checker → Settings**. Click **Save changes** after editing. The page shows an unsaved-changes line and warns you before you leave. **Reset to defaults** restores every setting after a confirmation.

### Display

![Settings: Product page](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/16-settings-display.avif)

| Setting | Default | Description |
| --- | --- | --- |
| Position on product pages | After the add to cart button | Also: before the button, after the price, below the product summary, a custom action hook, or only where you place the shortcode |
| Action hook | Empty | The hook name when **Custom action hook** is chosen, such as `woocommerce_product_meta_end` |
| Products without their own settings | Check all zones | See [How a postcode is decided](#how-a-postcode-is-decided) |
| Virtual products | `On` | Virtual products need no delivery check |
| Products that cannot be delivered | Show as usual | See [Undeliverable products](#undeliverable-products) |
| Show on cart | `Off` | Shows the checker on the cart page |
| Show on checkout | `Off` | Shows the checker above the checkout form |

The same positions work in block themes: the checker is placed next to the matching product block. On cart and checkout the checker asks about the whole store.

### Popup

![Settings: Location popup](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/17-settings-popup.avif)

The settings of the [Location popup](#location-popup).

| Setting | Default | Description |
| --- | --- | --- |
| Open the popup by itself | `Off` | Asks for a postcode when a visitor arrives and none is stored |
| Layout | Centred box | Or a panel at the bottom |
| Heading | Where should we deliver? | Popup title |
| Text | Enter your pincode to see what we can deliver to you. | Short explanation, with a visual editor |
| Button text | Continue | Submit button |
| Skip button text | Skip for now | Shown only when skipping is allowed |
| Launcher button, postcode known | Deliver to `{postcode}` | Label of the `[wpzc_location]` button |
| Launcher button, no postcode | Choose your location | Label when no postcode is stored |
| Where it opens | Every page | Or shop, category and product pages, or the home page |
| Wait before opening | Open at once | Or 3, 5, 10 or 20 seconds |
| Let shoppers skip | `On` | Turn off to ask for a postcode before browsing |
| Ask again after a skip | Next visit | Or after 1, 7 or 30 days, or never |

### Messages

![Settings: Checker texts](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/18-settings-messages.avif)

| Setting | Default text |
| --- | --- |
| Title | Check delivery to your area |
| Input placeholder | Enter your pincode |
| Button text | Check |
| Deliverable | Good news! We deliver to `{postcode}`. |
| Not deliverable | Sorry, we do not deliver to `{postcode}` yet. |
| The postcode is not valid | Please enter a valid pincode. |
| Cart item notices | `On`. Tells shoppers which cart items cannot be delivered |
| Cart item notice | `{product_name}` cannot be delivered to `{postcode}`. |
| Checkout error | Some items in your cart cannot be delivered to `{postcode}`. Remove them or use a different address. |

Message texts accept basic formatting.

#### Placeholders

| Placeholder | Replaced with |
| --- | --- |
| `{postcode}` or `{pincode}` | The checked postcode |
| `{days}` | Delivery days |
| `{delivery_date}` | The estimated delivery date |
| `{note}` | The zone, product or category note |
| `{zone}` | The zone name |
| `{product_name}` | The product name, where a product is known |

### Delivery date

| Setting | Description |
| --- | --- |
| Date format | Choose a ready-made format or **Custom**. The default follows your site's date format |
| No delivery on | Weekdays that are not counted as delivery days |
| Order cut-off time | Orders at or after this time count from the next day. Leave empty to turn the rule off |

The date is calculated in your site's time zone. The delivery days are counted from today, or from tomorrow after the cut-off, and skip the weekdays without delivery.

### Appearance

![Settings: Appearance](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/19-settings-appearance.avif)

The checker takes the fonts, colours and buttons of your theme. These settings only change its frame.

| Setting | Description |
| --- | --- |
| Style | **Match theme** (default): your theme's font, colours, field and button. **Card**: a bordered box with a title. **Minimal**: just the field and result |
| Accent colour | A colour for the frame mark, the answer mark and the focus ring. Leave empty to follow the text colour |

### Checkout

![Settings: Checkout rules](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/20-settings-checkout.avif)

| Setting | Default | Description |
| --- | --- | --- |
| Stop the order | `On` | Refuses the order and shows the checkout error when a cart item cannot be delivered |
| Hide payment methods | None | Selected methods, such as cash on delivery, are hidden when the cart has undeliverable items |

The shipping postcode is checked when "Ship to a different address" is on, otherwise the billing postcode. Both the classic checkout and the checkout block are supported.

### Shop

![Settings: Shop pages](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/21-settings-shop.avif)

| Setting | Default | Description |
| --- | --- | --- |
| Notice above the list | `On` | Says how many products are hidden and lets shoppers show them. Applies when products are hidden from the store |
| Show badges | `Off` | Shows on product lists whether each product delivers to the shopper's postcode |
| Deliverable label | Deliverable | Shown when badges are on |
| Not deliverable label | Not deliverable | Shown when badges are on |

### Migration

![Settings: Migration](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/22-settings-migration.avif)

Moves the data of version 3. See [Upgrading from version 3](#upgrading-from-version-3).

### Advanced

![Settings: Analytics and logging](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/23-settings-advanced.avif)

| Setting | Default | Description |
| --- | --- | --- |
| Count lookups | `On` | Counts checked postcodes per day. No personal data is stored |
| Debug log | `Off` | Writes details to the WooCommerce log. Turn it off when you are done |
| Delete all data on uninstall | `Off` | In the **Danger zone**. Deletes zones, postcodes, settings and product settings when the plugin is deleted. You are asked to confirm |

> **Warning:** Export your zones and product settings before you turn on **Delete all data on uninstall** or use **Reset to defaults**. They cannot be undone.

## What shoppers see

### The checker

1. The shopper enters a postcode and clicks the button.
2. The answer appears below the field, without reloading the page.
3. The postcode is saved for 30 days, so the next checker on the site answers by itself.

![The checker on a product page](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/25-product-checker.avif)

![A postcode that can be delivered](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/26-product-deliverable.avif)

![A postcode that cannot be delivered](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/27-product-not-deliverable.avif)

![An invalid postcode](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/28-product-invalid.avif)

A postcode entered at checkout or in the shipping calculator also updates the saved postcode. The address of the customer is not changed. The checker is not shown on products that need no check.

Without JavaScript, the form reloads the page and prints the answer.

### Cart notices

With **Cart item notices** on, the classic cart prints your message under each item that cannot be delivered. The cart block shows one list of these items above it.

![The checker on the cart page](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/30-cart-checker.avif)

![The checker on the checkout page](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/31-checkout-checker.avif)

## Shortcodes and block

| Shortcode | Output |
| --- | --- |
| `[wpzc_checker]` | The checker. On a product page it detects the product. Elsewhere it checks the whole store |
| `[wpzc_checker product_id="12"]` | The checker for one product |
| `[wpzc_checker title="Check your area"]` | The checker with a different title. `none` hides the title |
| `[wpzc_checker class="my-class" align="wide"]` | Extra CSS classes and `wide` or `full` alignment |
| `[wpzc_location]` | A button that shows the saved postcode and reopens the location popup |

In the block editor, add the **Pincode Checker** block (category WooCommerce). It has a product and a title setting and supports wide and full alignment, colours, spacing and typography.

## Location popup

The popup asks visitors for their postcode as they arrive. Turn it on with **Open the popup by itself** in **Settings → Popup**.

![The location popup in the center layout](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/32-popup-center.avif)

![The popup after a deliverable postcode](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/33-popup-served.avif)

![The popup after an area you do not serve](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/34-popup-not-served.avif)

![The location popup in the bottom layout](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/35-popup-bottom.avif)

- It opens only when the browser holds no postcode and the visitor has not skipped it recently.
- A skip is remembered for the time you choose in **Ask again after a skip**.
- A valid postcode is saved whether or not you serve it, so the shop rules know it.
- After the visitor chooses a location, the page reloads when it has a checker or shop rules, so they use the new postcode.

Without **Let shoppers skip**, the popup that opens by itself has no close button and ignores **Esc** and a click outside. A popup opened from a launcher button can always be closed.

> **Note:** Requiring a postcode before browsing can reduce visits from search engines.

### Launcher button

`[wpzc_location]` prints a button that shows the postcode of the shopper and opens the popup. Attributes: `empty` (label without a postcode), `set` (label with `{postcode}`) and `class`. A launcher makes the popup print even when it does not open by itself.

```text title="Example"
[wpzc_location set="Delivering to {postcode}" empty="Set location"]
```

To test the popup, open your store in a private browser window.

## Undeliverable products

Choose what happens to products that cannot be delivered under **Settings → Display → Products that cannot be delivered**. This applies after a shopper enters a postcode.

| Option | Shop and category pages | Product page |
| --- | --- | --- |
| Show as usual `Default` | Nothing changes | Only the checker shows the answer |
| Cannot be bought | The add to cart button becomes a "Not deliverable" label | The add to cart button is disabled |
| Hide from the store | The product is hidden | The add to cart button is disabled |

With **Cannot be bought** or **Hide from the store**, adding the product to the cart is also refused. With **Hide from the store** and **Notice above the list** on, a notice above the list says how many products are hidden and has a button that shows them.

**Show badges** in **Settings → Shop** adds a label to every product card.

![Delivery badges on the shop page](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/37-shop-badges.avif)

![Products that cannot be bought on the shop page](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/38-shop-cannot-be-bought.avif)

![A product page when the product cannot be bought](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/39-product-cannot-be-bought.avif)

![The notice above a list with hidden products](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/40-shop-hidden-bar.avif)

> **Page caching:** The rules are applied in the visitor's browser, so pages stay cacheable and the HTML holds nothing about the visitor.

## Dashboard and analytics

The dashboard shows:

- Active zones and total postcode rules
- Checks in the last 30 days and the share you can serve
- **Checks per day** for the last 14 days
- The postcodes asked for most that you do not serve, a good guide to where to expand
- The most checked postcodes

![The Dashboard screen](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/02-dashboard.avif)

![Testing a postcode on the Dashboard](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/03-dashboard-tester.avif)

**Test a postcode** accepts a postcode and, optionally, a product. It shows the result, the zone, the delivery date and the message the shopper sees. A test is not counted in the analytics.

Notices appear when analytics is off or when data of version 3 waits to be moved.

## Import and export

Open **Pincode Checker → Import / Export**. Files are handled in chunks of 1,000 rows, so upload size and time limits are not a problem.

![The Import / Export screen](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/15-import-export.avif)

### Export

1. Choose **Postcodes** or **Products**.
2. For postcodes, optionally choose one zone.
3. Download the file. **Download again** is shown afterwards.

### Import

1. Choose **Postcodes** or **Products**.
2. Drop a CSV file on the box, or choose it. The file is read in your browser first, and you see its columns and first rows.
3. Start the import. **Stop** ends it after the current chunk, and what was imported stays.

**File format and sample** lists every column and downloads a sample file.

```csv title="postcodes.csv"
zone,postcode,days,note
Delhi NCR,110001,2,Cash on delivery available
Delhi NCR,110002,2,
Delhi NCR,110003...110099,3,
Delhi NCR,1220??,4,
```

| Column | Description |
| --- | --- |
| `zone` | The zone name. A zone that does not exist is created **inactive** |
| `postcode` | A postcode in any of the formats above |
| `days` | Optional. Empty uses the zone value |
| `note` | Optional. Empty uses the zone value |

Postcodes a zone already has are kept. Their days and note are not changed.

```csv title="products.csv"
id,sku,name,mode,zones,days,note
12,,Blue hoodie,custom,Delhi NCR|Mumbai,3,
,HOODIE-01,Red hoodie,disabled,,,
```

| Column | Description |
| --- | --- |
| `id` or `sku` | The product. The ID is tried first, then the SKU |
| `name` | For your own reference |
| `mode` | The delivery setting |
| `zones` | Zone names separated by `\|`. Unknown names are dropped |
| `days` | Delivery days |
| `note` | A note |

A row that changes nothing is skipped. After an import you see the rows added, changed and skipped, the first 20 problems and a download of the problem list.

### Remove all current postcodes first

For postcodes only. It deletes the postcodes of every zone before the first chunk and asks for confirmation first.

> **Warning:** This cannot be undone. Export your zones first.

## Third-party integrations

:tag[teal][Marketplaces]

The plugin works with three multivendor marketplace plugins. Each integration starts **only when its plugin is active**, so there is nothing to switch on. Vendors can set the delivery area of their **own products** from their own dashboard, without opening wp-admin.

| Plugin | Where vendors find the fields |
| --- | --- |
| [Dokan](#dokan) | In the product form of the vendor dashboard |
| [WCFM Marketplace](#wcfm-marketplace) | A collapsible **Delivery area** section at the end of the product form |
| [MultiVendorX](#multivendorx) | A **Delivery area** tab in the product form |

The fields are the same everywhere and work as described in [Product and category rules](#product-and-category-rules):

| Field | Description |
| --- | --- |
| Setting | **Store default**, **Custom areas** or **No delivery check** |
| Zones | The zones that deliver this product |
| Postcodes | Postcodes of this product only |
| Days and Note | Apply to the postcodes of this product only |

How it works for all three:

- The fields appear for a product that is **already saved**. When a vendor adds a new product, the fields show after the first save.
- The values are saved only for a user who is allowed to edit that product, so a vendor cannot change the products of another vendor.
- The delivery area of a vendor's product is used like any other product. See [How a postcode is decided](#how-a-postcode-is-decided).
- You can still change a vendor's product in **Pincode Checker → Products** or in the product screen of wp-admin.

### Dokan

:tag[teal][Dokan]

When Dokan is active, vendors see the **Delivery area** fields in the product form of their Dokan dashboard. Click **Update product** to save them with the rest of the product.

### WCFM Marketplace

:tag[teal][WCFM]

When WCFM Marketplace is active, vendors see a collapsible **Delivery area** section at the end of the product form of the WCFM dashboard. Open it, choose the setting and click **Submit** to save it with the product. WCFM saves the product form without reloading the page, and the plugin saves the delivery fields in the same step.

### MultiVendorX

:tag[teal][MultiVendorX]

When MultiVendorX is active, vendors see a **Delivery area** tab in the product data of the vendor dashboard. Choose the setting and save the product as usual. The older name of the plugin, WC Marketplace, is supported too.

> **Note:** The integrations are tested with stand-ins that fire the actions of each plugin, not with the marketplace plugins themselves. Test them on a staging site with your version of the plugin before you go live, and [contact support](https://www.wecreativez.com/support/) if a field does not show or save.

## Upgrading from version 3

:tag[amber][3.x to 4.0]

Version 4 is a complete rebuild with a new database structure. Your data of version 3 is **copied** in small batches in the background. Nothing of version 3 is changed or deleted.

> **Before updating:** Take a full backup and, if possible, try the update on a staging site first.

| Version 3 data | Becomes |
| --- | --- |
| Settings, messages and colours | Version 4 settings |
| Uploaded pincode table | The zone **Imported postcodes** |
| Pincode Zone posts | Zones. A published post becomes an active zone, any other status an inactive zone |
| Product and category settings | Delivery settings of products and categories |

Follow the move under **Settings → Migration**. It shows a progress bar, the counts and the entries that were left out. You can also run `wp wpzc migrate`. It is safe to run again: nothing is doubled, and a product or category that already has a choice in version 4 is never overwritten.

### Check after upgrading

- Open **Pincode Checker → License** and confirm your license is active.
- Test several postcodes with the dashboard tester. Version 3 used the zone that matched **last**, version 4 uses the **first**. The zones are put in the reverse order so both pick the same zone.
- Postcodes of a kind that version 3 had switched off (range, wildcard or regular expression) are left out, because version 3 would not have matched them either. They are listed on the Migration tab.
- Regular expressions must now match the whole postcode.
- Review **Settings**, especially Checkout, Appearance and Messages.
- Test custom code. Hooks of version 3 no longer run. See [PHP hooks](#php-hooks).

> **Warning:** `wp wpzc migrate --restart` counts from zero and runs the migration again. Use it only on a clean set of data.

## REST API

:tag[violet][For developers]

The storefront uses public, read-only routes under `/wp-json/wpzc/v1/`.

### Check a postcode

:tag[green][GET] :tag[teal][Public]

```http
GET /wp-json/wpzc/v1/check?postcode=110001&product_id=12
```

| Parameter | Description |
| --- | --- |
| `postcode` | `Required` Postcode to check, at most 50 characters |
| `product_id` | `Optional` Product or variation. Without it, the whole store is checked |
| `record` | `Optional` Count this check in the analytics |

The answer holds `status` (`available`, `unavailable` or `invalid`), `deliverable`, `postcode`, `product_id`, `days`, `delivery_date`, `zone`, `note` and `message`. An invalid postcode is a normal answer with the status `invalid`. A product that does not exist gives `wpzc_product_not_found` (404).

### Check several products

:tag[green][GET] :tag[teal][Public]

```http
GET /wp-json/wpzc/v1/check-products?postcode=110001&ids=12,13,14
```

Accepts up to 100 product IDs and returns `status`, `deliverable` and `label` for each public product.

### Check the delivery location

:tag[green][GET] :tag[teal][Public]

```http
GET /wp-json/wpzc/v1/location?postcode=110001
```

Returns `valid` and `message`, and for a valid postcode also `postcode` and `served`. Each valid lookup is counted.

### Admin routes

:tag[red][Admin only]

The routes for zones, rules, settings, products, transfer, dashboard and migration are under the same namespace (for example `/wp-json/wpzc/v1/zones`) and need the plugin capability (`manage_woocommerce` by default).

| Route | Purpose |
| --- | --- |
| `/zones`, `/zones/{id}` | List, create, change and delete zones |
| `/zones/{id}/duplicate`, `/zones/{id}/export`, `/zones/order` | Duplicate, export and reorder |
| `/zones/{id}/rules` | List, add and delete the postcodes of a zone |
| `/settings`, `/settings/reset` | Read, save and reset settings |
| `/products`, `/products/{id}`, `/products/bulk` | Delivery settings of products |
| `/transfer/export`, `/transfer/import` | Chunks of CSV files |
| `/dashboard` | Report and counts (`days` 7, 30 or 90) |
| `/migration`, `/migration/run` | State and batches of the migration |

## WP-CLI

:tag[violet][For developers]

| Command | Description |
| --- | --- |
| `wp wpzc status` | Show versions, zone counts, the default coverage and the lookups of the last 30 days |
| `wp wpzc check <postcode>` | Check a postcode. Add `--product=<id>` and `--format=<table\|json\|yaml>` |
| `wp wpzc migrate` | Run the migration of version 3. Add `--restart` to count from zero |

```bash
wp wpzc check 110001 --product=42
```

## Troubleshooting

### Every postcode is "not deliverable"

- Check that at least one zone exists and is **Active**.
- If **Products without their own settings** is **Not deliverable**, assign zones to your products or categories.
- A **Custom areas** product uses only its own zones and postcodes.
- Use the dashboard tester to see the answer.

### Customers cannot check out

Test the shipping postcode with the product on the dashboard. Add the postcode to a zone, or turn off **Settings → Checkout → Stop the order**.

### The checker does not appear

- The product may be virtual, set to **No delivery check**, or not checked by your store setting.
- If the position is **Only where I place the shortcode**, add `[wpzc_checker]`.
- With a custom hook, confirm your theme runs that hook.
- Some themes or page builders skip standard WooCommerce hooks. Use the shortcode instead.

### The wrong delivery time is shown

- A postcode, product or category may have its own days.
- Zones are checked from first to last, and the first match wins. Reorder them on the **Zones** screen.
- Check **No delivery on** and **Order cut-off time**.

### A postcode in my list does not match

- Both ends of a range need the same number of digits.
- A regular expression must be written between slashes and match the whole postcode.
- Make sure the zone that holds it is active.

### My import skipped rows

The summary lists the first 20 problems. Download the problem list, fix those rows and import again. Compare your columns with the sample file.

### The location popup does not open

- Confirm **Open the popup by itself** is on.
- It does not open if a postcode is already saved or you skipped it recently. Use a private window.
- Check **Where it opens**.

### Vendors do not see the Delivery area fields

- Confirm the marketplace plugin (Dokan, WCFM Marketplace or MultiVendorX) is active.
- The fields show for a product that is already saved. Save a new product once, then open it again.
- A vendor can set the delivery area only for products they are allowed to edit.

### The license does not activate

- Copy the key or purchase code again, without extra spaces.
- **Activation limit reached:** deactivate the license on the other site, or manage your activations in your account (WeCreativez) or on the Envato licenses page (Envato).
- **Could not reach the license server:** try again later, and check that your host or firewall allows connections to wecreativez.com.
- An expired license needs renewal. For a blocked or revoked license, [contact support](https://www.wecreativez.com/support/).

### Updates do not appear

Check that the license is active on this site address, then use **Check for updates** on the License screen.

### The License screen says the license client is not installed

Automatic updates are off in that copy of the plugin. Download the plugin again from your account and reinstall it.

## FAQ

<details>
<summary>Do I have to create a zone first?</summary>

Yes. With no zone and no postcodes of their own, no postcode can be delivered to.

</details>

<details>
<summary>Can I use the plugin outside India?</summary>

Yes. A postcode can contain letters and numbers, so Indian pincodes, US ZIP codes and UK postcodes all work. Use wildcards such as `SW1*` for postcodes with letters, because ranges work with numbers only.

</details>

<details>
<summary>Do I have to add every postcode one by one?</summary>

No. Use a range such as `110001...110099`, a wildcard such as `1100??`, or a regular expression. You can also import a CSV file of any size from **Pincode Checker → Import / Export**.

</details>

<details>
<summary>Can different products have different delivery areas?</summary>

Yes. Set a product or category to **Custom areas** and choose its zones or enter its own postcodes. For many products at once, use **Pincode Checker → Products** or import a product settings CSV file.

</details>

<details>
<summary>Can my vendors set their own delivery areas?</summary>

Yes, with Dokan, WCFM Marketplace or MultiVendorX. Vendors get a **Delivery area** section in the product form of their dashboard. See [Third-party integrations](#third-party-integrations).

</details>

<details>
<summary>Can I block only a few postcodes and deliver everywhere else?</summary>

There is no exclude list. A zone contains the postcodes you **do** deliver to, so add your served areas as ranges or wildcards and leave out the ones you do not serve.

</details>

<details>
<summary>Which delivery time is used when several zones match?</summary>

Zones are checked from first to last, and the first zone that matches wins. Use **Move up** and **Move down**, or drag the cards, to change the order.

</details>

<details>
<summary>Can I hide Cash on Delivery for areas I do not serve?</summary>

Yes. Select it under **Settings → Checkout → Hide payment methods**. It is hidden when the cart has items that cannot be delivered to the shopper's postcode. If **Stop the order** is on, such orders are stopped completely.

</details>

<details>
<summary>Does it work with the block cart and checkout?</summary>

Yes. Order blocking works with both the classic and the block checkout, and the checker can be shown above the cart and checkout blocks. The notice under individual cart items appears on the classic cart only. The block cart shows one list above it.

</details>

<details>
<summary>Does it work with page caching?</summary>

Yes. Pages contain nothing about the shopper. The postcode is read from a cookie in the browser and the answer is fetched after the page loads.

</details>

<details>
<summary>What customer data does the plugin store?</summary>

The shopper's postcode is saved in a cookie in the shopper's browser for 30 days. Lookup analytics counts postcodes per day without names, addresses, IP addresses or user IDs, and you can turn it off under **Settings → Advanced**.

</details>

<details>
<summary>Will I lose my version 3 data when I update?</summary>

No. The data is copied, and version 3 keeps its own.

</details>

<details>
<summary>Will I lose my data if I deactivate or delete the plugin?</summary>

Deactivating keeps all your data. Deleting the plugin also keeps it, unless **Delete all data on uninstall** is on under **Settings → Advanced**.

</details>

## License and updates

:tag[blue][WeCreativez] :tag[green][Envato / CodeCanyon]

An active license gives you plugin updates inside WordPress, new features and security fixes, and support from the people who build the plugin. Open **Pincode Checker → License**. Only an administrator (the `manage_options` capability) can manage the license.

![The License screen](/wp-content/uploads/drivepress/wp-plugins/woocommerce-pincode-zipcode-checker/documentation/4.0.0/24-license.avif)

The License screen has one field for both stores. Which store you bought from decides what you paste in it:

| Bought from | You need |
| --- | --- |
| WeCreativez | The license key you received after purchase on wecreativez.com |
| Envato / CodeCanyon | Your CodeCanyon purchase code |

The plugin recognises an Envato activation by itself, and the status card shows **Purchased from** as **WeCreativez** or **Envato**.

| Status | Meaning |
| --- | --- |
| Not activated | No license is activated on this site. Enter your key or purchase code |
| Active | The license works and you receive updates |
| Needs attention | The license server reported a problem. The screen shows the reason |

### Activate a WeCreativez license

:tag[blue][WeCreativez]

1. Find the license key you received after your purchase on wecreativez.com.
2. Open **Pincode Checker → License** and paste the key in the key field.
3. Click **Activate**.

Activation sends your license key and site address to wecreativez.com. The key itself is not saved on your site. A key that belongs to another product is not accepted.

Once active, the status card shows the license details and these actions:

| Action | What it does |
| --- | --- |
| Check for updates | Asks the license server for a new version now |
| Update available | Appears when a newer version exists |
| Deactivate | Releases the license from this site, so you can use it elsewhere |

**Manage your licenses** opens [your account](https://www.wecreativez.com/my-account/licenses/), where you can review your activations, deactivate a site or buy another license.

### Activate an Envato license

:tag[green][Envato / CodeCanyon]

1. In your CodeCanyon downloads, find the [purchase code](https://www.wecreativez.com/article/where-is-my-envato-purchase-code/) of the plugin.
2. Open **Pincode Checker → License** and paste the purchase code in the same field.
3. Click **Activate**.

> **Note:** One standard license is valid for only one website.

Once active, the same status card appears, with **Purchased from: Envato**. **Check for updates** and **Deactivate** work exactly as for a WeCreativez license. **Manage license** opens the [Envato licenses](https://www.wecreativez.com/envato-manage-license/) page, where you can review and release the sites of your purchase code.

### Plugin updates

New versions appear on the WordPress **Plugins** screen like other updates. Take a backup, then click **Update now**. Updates need an active license, and version information is cached for a few hours, so use **Check for updates** to refresh it.

### Upgrading from version 3

The license of an earlier version stays active after the upgrade, whether it came from WeCreativez or Envato.

### Moving your site

Before moving a site to another domain, deactivate the license on the old address, then activate it again on the new one. A change between HTTP and HTTPS can also require this.

## Support

For help, visit the [support page](https://www.wecreativez.com/support/) or the [product page](https://www.wecreativez.com/product/woocommerce-pincode-zipcode-checker/). Include your WordPress, WooCommerce, PHP and plugin versions, the postcode you tested and the dashboard tester result.
