Skip to content

Commit

Permalink
optional state
Browse files Browse the repository at this point in the history
  • Loading branch information
dopin committed Apr 8, 2022
1 parent 59da658 commit e049953
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,12 @@ private function convertToAddressParameter($address)
'street_address1' => $streets[0],
'street_address2' => $streets[1],
'country' => $this->_countryFactory->create()->loadByCode($address->getCountryId())->getName(),
'state' => $address->getRegionCode(),
'city' => $address->getCity(),
];

if ($address->getRegion()) {
$param['state'] = $address->getRegion();
}
}

return $param;
Expand Down

0 comments on commit e049953

Please sign in to comment.