I'm trying to get Region from shipping address. Here's the code :
$customer = $this->customerRepository->get('firstname.lastname@example.org'); $shippingAddressId = $customer->getDefaultShipping(); $shippingAddress = $this->addressRepository->getById($shippingAddressId); $shippingAddress->getRegion();
But I'm not getting string of region name, instead I got Object from
The country is not United States, so Region is simply string ( input text form ) instead of select, so no Region Id / Region Code when I created the customer from admin.
So, how correct way to get Region from shipping when there are no region id / region code?