From: varshith89 Date: Wed, 7 Mar 2018 03:04:59 +0000 (+0000) Subject: CRM-21830: Add 'state_province_name' token and set appropriate value to it so that... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b6fe7f069566614be5a65df98d11b9a5ae03b03e;p=civicrm-core.git CRM-21830: Add 'state_province_name' token and set appropriate value to it so that it is not empty for billing address --- diff --git a/CRM/Utils/Address.php b/CRM/Utils/Address.php index 8a65d4255d..c5f8985aab 100644 --- a/CRM/Utils/Address.php +++ b/CRM/Utils/Address.php @@ -331,6 +331,7 @@ 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}", ); @@ -348,10 +349,13 @@ class CRM_Utils_Address { $value = $params[$alternateName]; } } - if (is_numeric($value) && ($name == 'state_province' || $name == 'country')) { + if (is_numeric($value) && ($name == 'state_province' || $name == 'state_province_name' || $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); + } if ($name == 'country') { $addressFields[$name] = CRM_Core_PseudoConstant::countryIsoCode($value); }