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
- Install Checkpost from the Shopify App Store.
- Open Templates and choose Hide express shipping to PO boxes.
- List the names of your express rates.
- 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:
- Address line 1 matches pattern \bp\.?\s*o\.?\s*box\b, \bpost\s*office\s*box\b
- Address line 2 matches pattern \bp\.?\s*o\.?\s*box\b, \bpost\s*office\s*box\b
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
- List each express rate name your checkout shows (e.g. "Express", "Overnight", "Next day").
- Pair it with the Block PO Box addresses template if no courier can deliver to PO Boxes at all.
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
Hide local delivery outside your ZIPs
Hide the local delivery option unless the shipping ZIP / postal code is in your delivery area.
Hide express for oversized items
Hide express and overnight shipping when the cart contains products tagged oversized.
Ground shipping only for hazmat-tagged carts
Hide rates named Air, Express or Overnight when the cart contains hazmat-tagged products, while retaining your configured ground rates.
Exclude remote states from free shipping
Hide rates named Free shipping for US addresses in Alaska or Hawaii, keeping paid rates available instead of blocking the order.