Skip to content

Commit

Permalink
Merge pull request #387 from mailchimp/fix-null-province-code
Browse files Browse the repository at this point in the history
Remove province_code if null
  • Loading branch information
Santiagoebizmarts authored Jul 14, 2017
2 parents 21e95f6 + 288cd0b commit fdd0812
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ protected function getCustomerAddressData($customer)

if ($customer->getRegionId()) {
$customerAddress["province_code"] = $this->directoryRegionModel->load($customer->getRegionId())->getCode();
if (!$customerAddress["province_code"]) {
unset($customerAddress["province_code"]);
}
}

if ($customer->getPostcode()) {
Expand Down

0 comments on commit fdd0812

Please sign in to comment.