Checkpost

How to hide express shipping for PO Box addresses on Shopify

Short answer: Couriers can't deliver express to a PO Box: hide express and overnight rates when the address is one. In Checkpost, choose “Hide express shipping to PO boxes” from Templates, adjust the values, test it, then save and enable the rule.

The problem

Express and overnight services from couriers can't deliver to PO Boxes. If the rate is offered anyway, shoppers pay for speed they won't get and the parcel is delayed or returned.

How to set it up

  1. Install Checkpost from the Shopify App Store.
  2. Open Templates and choose Hide express shipping to PO boxes.
  3. List the names of your express rates.
  4. Use Try this rule to test a sample cart, then click Save rule.

The rule

Hide delivery methods containing "Express" or "Overnight" when any of these conditions are true:

Shoppers see no message: the methods are changed before checkout shows them.

Rule definition (JSON)
{
  "name": "No express to PO Boxes",
  "action": {
    "kind": "hide_delivery",
    "methods": [
      "Express",
      "Overnight"
    ],
    "match": "contains"
  },
  "match": "any",
  "conditions": [
    {
      "kind": "text",
      "field": "ship_address1",
      "op": "matches_regex",
      "values": [
        "\\bp\\.?\\s*o\\.?\\s*box\\b",
        "\\bpost\\s*office\\s*box\\b"
      ]
    },
    {
      "kind": "text",
      "field": "ship_address2",
      "op": "matches_regex",
      "values": [
        "\\bp\\.?\\s*o\\.?\\s*box\\b",
        "\\bpost\\s*office\\s*box\\b"
      ]
    }
  ]
}

Where this rule works

This changes existing delivery options; it does not create rates, change their prices or configure pickup. Address conditions are evaluated for each delivery group's own address. Product-tag conditions inspect the whole cart. Verify that an eligible delivery option remains.

Tips

Can you do this without an app?

Shopify's shipping settings decide rates by zone and weight, not by the street address, so a PO Box can't remove a rate without an app.

FAQ

Does it also check the second address line?

Yes. Both address lines are checked, because shoppers often put the PO Box in line 2.

What if every rate is hidden?

Only matching rates are hidden. Keep at least one rate (for example standard postal) that delivers to PO Boxes.

Related rules

Add hide express shipping to po boxes to your store