diff --git a/app/code/Magento/Tax/Setup/UpgradeData.php b/app/code/Magento/Tax/Setup/UpgradeData.php index c2b9baca84042..5ede9cb6180e4 100644 --- a/app/code/Magento/Tax/Setup/UpgradeData.php +++ b/app/code/Magento/Tax/Setup/UpgradeData.php @@ -81,7 +81,7 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface false ); } - if (version_compare($context->getVersion(), '2.0.2', '<')) { + if (version_compare($context->getVersion(), '2.0.3', '<')) { //Update the tax_region_id $taxRateList = $this->taxRateRepository->getList($this->searchCriteriaFactory->create()); /** @var \Magento\Tax\Api\Data\TaxRateInterface $taxRateData */ @@ -91,6 +91,9 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface /** @var \Magento\Directory\Model\Region $region */ $region = $this->directoryRegionFactory->create(); $region->loadByCode($regionCode, $taxRateData->getTaxCountryId()); + if ($taxRateData->getTaxPostcode() === null) { + $taxRateData->setTaxPostcode('*'); + } $taxRateData->setTaxRegionId($region->getRegionId()); $this->taxRateRepository->save($taxRateData); } diff --git a/app/code/Magento/Tax/etc/module.xml b/app/code/Magento/Tax/etc/module.xml index 4f1c5dbeb12ec..a100b0ac01181 100644 --- a/app/code/Magento/Tax/etc/module.xml +++ b/app/code/Magento/Tax/etc/module.xml @@ -6,7 +6,7 @@ */ --> - +