Merge pull request #3195 from CihanSenturk/fix-address-format-nullable-style-issue

Fixed address format nullable style issue
This commit is contained in:
Cüneyt Şentürk 2024-08-01 09:19:27 +01:00 committed by GitHub
commit 6276e14d8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -79,6 +79,14 @@ trait Contacts
public function getFormattedAddress($city = null, $country = null, $state = null, $zip_code = null)
{
if (is_null($city)
&& is_null($country)
&& is_null($state)
&& is_null($zip_code)
) {
return null;
}
$address_format = setting('default.address_format');
$formatted_address = str_replace(