We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd71662 commit 618c0cbCopy full SHA for 618c0cb
1 file changed
lib/ZipLookup.php
@@ -41,7 +41,7 @@ public function getCityStateByZip($zip)
41
$loc_level_3 = (string) $value->long_name;
42
}
43
if ($value->type[0] == 'country') {
44
- $loc_level_4 = (string) $value->long_name;
+ $loc_level_4 = (string) $value->short_name;
45
46
47
} else {
@@ -53,7 +53,7 @@ public function getCityStateByZip($zip)
53
54
// Set the state based on US or non-US location
55
$aAddress[2] = $loc_level_1;
56
- if ($loc_level_4 == 'United States') {
+ if ($loc_level_4 == 'US') {
57
$aAddress[3] = $loc_level_3;
58
59
$aAddress[3] = $loc_level_2;
0 commit comments