State code showing instead of State Name in customer/address page
RK REZA last edited by
Only State code showing in customer/address page. Isn't it obvious that the default_name of state would show like country?
public function country_name($code)
$country = $this->countryRepository->findOneByField('code', $code);
return $country ? $country->name : ''; }
For state ?
rahul last edited by
We have also created findStateByCountryCode function also in same file, pass your country and state code in this function like core()->findStateByCountryCode($address->country, $address->state).
You will get CoutryState Model data (https://prnt.sc/peqr99 ) and print's its default name, you will get state name.