Hello,
You need to follow below steps:
Override _getRegions($storeId) method of Mage_Directory_Helper_Data class.
Assign the Region Codes which you want to exclude into an array i.e $excludeRegions variable.
Add logic for skip above region codes from available list
So the final code looks like as below:
$excludeRegions = array('AK','HI'); // sorry I don't know Porto Rico, po box, Military bases, APO region codes.
foreach ($collection as $region) {
if (!$region->getRegionId()) {
continue;
}
//BOF Custom Logic Here
$regionCode = $region->getCode();
if (in_array($regionCode, $excludeRegions)) {
continue;
}
//EOF Custom Logic Here
$regions[$region->getCountryId()][$region->getRegionId()] = array(
'code' => $region->getCode(),
'name' => $this->__($region->getName())
);
}
Regards,