Skip to content

Commit

Permalink
Fixes exception when posting mutlidimensional array to mailchimp
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Dec 20, 2020
1 parent fdda86f commit ceba72d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/DataGenerator/StoreDataGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ public function generate(AudienceInterface $audience): array

$shopBillingData = $channel->getShopBillingData();
if (null !== $shopBillingData) {
$data['address']['address1'] = $shopBillingData->getStreet();
$data['address']['city'] = $shopBillingData->getCity();
$data['address']['postal_code'] = $shopBillingData->getPostcode();
$data['address']['country_code'] = $shopBillingData->getCountryCode();
$data['address'] = (object) [
'address1' => $shopBillingData->getStreet(),
'city' => $shopBillingData->getCity(),
'postal_code' => $shopBillingData->getPostcode(),
'country_code' => $shopBillingData->getCountryCode(),
];

$data['timezone'] = self::getTimeZone($shopBillingData->getCountryCode());
}
Expand Down

0 comments on commit ceba72d

Please sign in to comment.