Handle Null values for location nam es

This commit is contained in:
David Bomba 2025-06-30 10:18:18 +10:00
parent 80cc78fa24
commit cc155bac72
1 changed files with 2 additions and 2 deletions

View File

@ -79,12 +79,12 @@ class LocationData extends AbstractService
private function getLocationName(): string
{
return $this->businessLocation ? $this->businessLocation->name : '';
return $this->businessLocation ? ($this->businessLocation->name ?? '') : '';
}
private function getShippingLocationName(): string
{
return $this->shippingLocation ? $this->shippingLocation->name : '';
return $this->shippingLocation ? ($this->shippingLocation->name ?? '') : '';
}
private function getBusinessCountry(): ?Country