-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Description
Hey,
It looks like the formatter some countries is a little off.
I've seen it for Italy and Spain with a Danish locale.
Below is the format for Italy for example:
"fmt":"%N%n%O%n%A%n%Z %C %S"
As far as I can tell, it is leaving the %S leftover.
It could be happening to other locales as well.
We are using the package as such:
$formatter = new AddressFormat\Format();
$formatter->setLocale($locale ?? $address->country->iso);
$formatter['ADMIN_AREA'] = $address->state;
$formatter['LOCALITY'] = $address->city;
$formatter['RECIPIENT'] = trim($address->name . "\n" . $address->att);
$formatter['ORGANIZATION'] = $address->company;
$formatter['POSTAL_CODE'] = $address->zip;
$formatter['STREET_ADDRESS'] = trim($address->street . "\n" . $address->street2);
$formatted = $formatter->formatAddress() . "\n" . $address->country->caption($lang);It seems to have happened after upgrading from 1.5.0 to 2.0.0 - and I can confirm, downgrading to 1.5.0 fixes the issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels


