WooCommerce: No PO Boxes


Please contact us at support@majemedia.com or go to https://www.majemedia.com for plugin support.

Restricts the WooCommerce checkout form for allowing PO Boxes for shipping addresses.

  • If same billing/shipping address the customer cannot complete checkout with a PO Box as a billing/shipping address.
  • If the customer is shipping to a different physical address they cannot use a PO Box as a shipping address, but can use it as a billing address.
  • Does not restrict the use of PO Boxes on Digital/Virtual only carts.
  • Requires that WooCommerce shipping is enabled.
  • Requires that WooCommerce has a shipping method setup (can be free shipping only).

Usage and extending examples

GitLab project


  • When shipping to the same billing address the billing address fields are reviewed
  • When shipping to a different address only the shipping side is reviewed
  • Settings page with configurable messaging (no html markup allowed)


  1. Have WooCommerce installed and activated
  2. Enable shipping
  3. Add this plugin or upload the .zip file (downloaded from here)
  4. Activate plugin


October 18, 2019
Hi, I found out why it was not working on my standalone WooCommerce site: The product was VIRTUAL, and hence, did not require shipping. Therefore, your plugin works on a WordPress single-site installation. Unfortunately, I could not get it to work on a WordPress/WooCommerce MULTISITE installation. I could not disable all the plugins on the clients site as it is a live site, however, this is probably something that would be good if you tested since it is your plugin. I will try and change my reviews if I can. Top marks for the quick replies, and if you could confirm/deny the Multisite compatibility with your plugin that would be great. Michael.
July 23, 2018
I'm not a fan of multiple utility plugins that bloat the site, that I could just program myself. But this was quick, easy and light to install.
August 3, 2017
Great Plugin. Helped us out of a jam. Great customer service. Very fast!
January 12, 2017
I have been searching the web for this. Everywhere I looked there was an assortment of confusing options for how to add something like this. Most involved copying and pasting code into your functions.php. Finding this plugin just made my day.
Read all 4 reviews

Contributors & Developers

“WooCommerce: No PO Boxes” is open source software. The following people have contributed to this plugin.




  • Fixed for working with WordPress 5.5.x
  • Fixed for working with WooCommerce 4.5.x
  • Updated version


  • Added “p o box” to restricted strings
  • Updated WordPress version tested against to 5.4 branch
  • Updated WooCommerce version tested against to 4.3.0


  • Github #17: Plugin is now semi-comptible with WooCommerce’s official USPS shipping plugin. Please see github issue referenced for limits of the compatibility.


  • Github #16: Updated the settings screen display of shipping methods to display the title of the shipping method instead of the shipping method type title.


  • Tested to WordPress 5.3
  • Tested to WooCommerce 3.8.1
  • Fixed issue causing checkouts to go through with PO Boxes in limited cases


  • Renamed plugin to drop “Maje”


  • Really removed mailto link from readme


  • Removed mailto link from description because it doesn’t work


  • Updated screenshots
  • Updated readme changelog
  • Updated github repo link
  • Updated Description with links


  • Bumped tested to versions of WordPress & WooCommerce


  • Fix: Used the wrong function for translation


  • Fix: Accidentally used a PHP7.0 only argument. Fixed to allow for php 5.3+
  • Fix: Settings page was throwing notices when new, unsaved shipping methods were displayed


  • New: Restrict by Shipping Method per Shipping Zone
  • New: Filter: mwnpb_restrict_shipping_method
  • New: Filter: mwnpb_allow_pobox
  • Bug Fix: Verifying that the returned variable type in the ‘mmwc_restricted_words’ filter is an array otherwise resetting to default set of words
  • Update: Plugin Name to “WooCommerce: No PO Boxes” from “Maje WooCommerce No PO Boxes” for WC extension conformity.
  • Update: Actually setting tested against WordPress 4.9
  • Maintenance: Complete codebase refactor to make future updates less time intensive
  • Meta: Added Requires PHP 5.6 header to plugin main file and readme
  • Meta: Readme information to claim 5.6 required. Not yet required. Just setting the stage


  • Tested against WordPress 4.9
  • tested against WooCommerce 3.2.3
  • Added the following words to the deny list: PO. Box, PO.Box, P.O Box, P.O


  • Forgot to update version in main php file… fixing to allow for updates in sites using


  • Fix: Plugin now puts all restricted strings to lowercase instead of assuming they are
  • Tested to WordPress version 4.8.2
  • Added WooCommerce version check strings to main php file


  • Fix: Plugin options getting deleted upon plugin deactivation
  • Updated: Plugin options are deleted upon uninstall
  • Updated: Added link to documentation on settings page
  • Updated: Default functionality status: On (previously disabled upon installation)
  • Tested to WordPress version 4.8.1


  • Tested to WordPress version 4.8


  • Tested to WordPress version 4.7.1


  • Tested to WordPress version 4.7


  • Tested to WordPress version 4.6.1


  • Updated tested to WordPress version.


  • Updated for WordPress 4.5 Compatibility


  • Added instruction text for cases where WooCommerce shipping is not enabled


  • Changed to using plain text text domain instead of class constant


  • Added filter mmwc_restricted_message
  • Added filter mmwc_restricted_words


  • Added the ability to turn on and off the restriction (off by default)
  • Added Settings link to the Plugin listing page


  • Updated documentation


  • Created plugin