private function getServices() { $country = $this->getAddress('country'); $type = uspsServices::getTypeByCountry($country); if ($type == uspsServices::TYPE_DOMESTIC) { $filter = array_keys($this->plugin->services_domestic); } else { $filter = array_keys($this->plugin->services_international); } $services = uspsServices::getServicesFiltered($type, $filter); if (empty($services)) { throw new waException($this->plugin->_w("There's no any service for this country: " . $country)); } return $services; }