Merge pull request #13230 from colemanw/Api3
[civicrm-core.git] / CRM / Utils / Address.php
index 84ec2f8162ebc5b3092f3fd8e0332950a4c51f94..c01662e604278fe6c90ff30a662b5d60f17e605f 100644 (file)
@@ -331,7 +331,6 @@ class CRM_Utils_Address {
       "city" => "billing_city-{$billingLocationTypeID}",
       "postal_code" => "billing_postal_code-{$billingLocationTypeID}",
       "state_province" => "state_province-{$billingLocationTypeID}",
-      "state_province_name" => "state_province-{$billingLocationTypeID}",
       "country" => "country-{$billingLocationTypeID}",
     );
 
@@ -349,12 +348,10 @@ class CRM_Utils_Address {
           $value = $params[$alternateName];
         }
       }
-      if (is_numeric($value) && ($name == 'state_province' || $name == 'state_province_name' || $name == 'country')) {
+      if (is_numeric($value) && ($name == 'state_province' || $name == 'country')) {
         if ($name == 'state_province') {
           $addressFields[$name] = CRM_Core_PseudoConstant::stateProvinceAbbreviation($value);
-        }
-        if ($name == 'state_province_name') {
-          $addressFields[$name] = CRM_Core_PseudoConstant::stateProvince($value);
+          $addressFields[$name . '_name'] = CRM_Core_PseudoConstant::stateProvince($value);
         }
         if ($name == 'country') {
           $addressFields[$name] = CRM_Core_PseudoConstant::countryIsoCode($value);