diff --git a/app/code/Magento/Directory/Setup/InstallData.php b/app/code/Magento/Directory/Setup/InstallData.php index 33c3ae4558e16..0556a7229d5e5 100644 --- a/app/code/Magento/Directory/Setup/InstallData.php +++ b/app/code/Magento/Directory/Setup/InstallData.php @@ -809,6 +809,14 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface ['BR', 'SE', 'Sergipe'], ['BR', 'TO', 'Tocantins'], ['BR', 'DF', 'Distrito Federal'], + ['AU', 'ACT', 'Australian Capital Territory'], + ['AU', 'NSW', 'New South Wales'], + ['AU', 'VIC', 'Victoria'], + ['AU', 'QLD', 'Queensland'], + ['AU', 'SA', 'South Australia'], + ['AU', 'TAS', 'Tasmania'], + ['AU', 'WA', 'Western Australia'], + ['AU', 'NT', 'Northern Territory'], ]; foreach ($data as $row) { diff --git a/app/code/Magento/Directory/Setup/UpgradeData.php b/app/code/Magento/Directory/Setup/UpgradeData.php index 4ee9ea33673d7..3f9b510550719 100644 --- a/app/code/Magento/Directory/Setup/UpgradeData.php +++ b/app/code/Magento/Directory/Setup/UpgradeData.php @@ -46,6 +46,9 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface if (version_compare($context->getVersion(), '2.0.2', '<')) { $this->addCountryRegions($setup, $this->getDataForIndia()); } + if (version_compare($context->getVersion(), '2.0.3', '<')) { + $this->addCountryRegions($setup, $this->getDataForAustralia()); + } } /** @@ -127,6 +130,25 @@ private function getDataForIndia() ]; } + /** + * Australian states data. + * + * @return array + */ + private function getDataForAustralia() + { + return [ + ['AU', 'ACT', 'Australian Capital Territory'], + ['AU', 'NSW', 'New South Wales'], + ['AU', 'VIC', 'Victoria'], + ['AU', 'QLD', 'Queensland'], + ['AU', 'SA', 'South Australia'], + ['AU', 'TAS', 'Tasmania'], + ['AU', 'WA', 'Western Australia'], + ['AU', 'NT', 'Northern Territory'] + ]; + } + /** * Add country regions data to appropriate tables. * diff --git a/app/code/Magento/Directory/etc/module.xml b/app/code/Magento/Directory/etc/module.xml index a3735ca6ddde1..cc8023b9b3873 100644 --- a/app/code/Magento/Directory/etc/module.xml +++ b/app/code/Magento/Directory/etc/module.xml @@ -6,7 +6,7 @@ */ --> - +