NEWDiscoverShipGoal– turn cart progress into bigger baskets
All articles

To block PO boxes on Shopify, create a checkout rule that checks the first line of the shipping address. BlockCart spots common PO box spellings, and customers who enter one see your message asking for a street address.

Before you start

You need an active BlockCart subscription to save a rule.

Set up the rule

  1. In BlockCart, select Create new rule. In the dialog, choose Cart and checkout validation.
  2. Name the rule, such as “No PO boxes.” Keep Rule input set to Standard input.
  3. Under Eligibility, select Only when conditions match. In Conditions, change the existing condition to Shipping address (line 1) and choose is a PO box. This operator needs no value.
  4. In Error message, write “We can't ship to a PO box. Please enter a street address.” Under Target placement, choose Address line 1 so the message appears beside the address field.
  5. Set Status to Live, then Save. Enter a PO box address in Shopify checkout to check that the message appears.

TODO screenshot: checkout rule with Shipping address (line 1) is a PO box and an Address line 1 error message

Example

| Rule input | Conditions | Error message | | -------------- | --------------------------------------------- | --------------------------------------------------------- | | Standard input | Shipping address (line 1) is a PO box | We can't ship to a PO box. Please enter a street address. |

Good to know

  • is a PO box matches PO Box, P.O. Box, P O Box and Post Office Box at the start of the line. It ignores letter case and punctuation, so p.o. box 12 and PO-Box 12 match too.
  • It does not match street names, so "123 Post Office Road" and "Hippo Box Lane" pass. It also does not match a line that only says Box 12. Add an OR group with starts with Box if your customers write it that way.
  • Need the opposite? is not a PO box matches every street address. Use it to allow only PO boxes for a product, for example.
  • This rule checks address line 1. It does not check address line 2 or decide whether an address is a real PO box.
  • is a PO box works with Standard, Attribute and Customer input. The rule can match only once the customer has entered a shipping address. Rule input is locked after you create the rule.

Related articles