public static function getInternationalShippingLocations() { if (EbayShippingLocation::getTotal()) { return EbayShippingLocation::getEbayShippingLocations(); } $ebay = new EbayRequest(); $locations = $ebay->getInternationalShippingLocations(); foreach ($locations as $location) { EbayShippingLocation::insert(array_map('pSQL', $location)); } return $locations; }