How to Hide Zones or "States" at the Checkout Pane

Last updated on
4 October 2017

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

The absolute easiest way of doing this, is to install the Ubercart Disable Zones module.

https://drupal.org/project/uc_disable_zones


There are other methods such as invoking hook_form_alter if you like to program it, or you can directly edit the country file and import it into UC. The problem with editing the country file directly is that it causes two issues:

1) It destroys existing data. When you import the country file, it stores the info in the database, and re-importing it will cause issues with all existing orders. (No direct issues for a fresh install site, see #2)

2) If you remove zones / states today, you might find an alternative method of shipping to those states a year from now and want to add them back in, but guess what: You've got a hosed database you'll have to piece back together to re-add what you've removed...


The UC Disable Zones hasn't seen a stable 7.x release yet, but the dev version seems to be working well enough to use on everyday production sites.

Help improve this page

Page status: No known problems

You can: