Skip to content

Commit

Permalink
MAGETWO-70460: Update attribute vat_id frontend_label to make it tran…
Browse files Browse the repository at this point in the history
…slatable #10140
  • Loading branch information
ishakhsuvarov authored Jul 5, 2017
2 parents bf70240 + 86feee6 commit 4da47e6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions app/code/Magento/Customer/Setup/UpgradeData.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
);
}

if (version_compare($context->getVersion(), '2.0.12', '<')) {
$this->upgradeVersionTwoZeroTwelve($customerSetup);
}

$indexer = $this->indexerRegistry->get(Customer::CUSTOMER_GRID_INDEXER_ID);
$indexer->reindexAll();
$this->eavConfig->clear();
Expand Down Expand Up @@ -636,6 +640,15 @@ private function upgradeVersionTwoZeroSeven($customerSetup)
);
}

/**
* @param CustomerSetup $customerSetup
* @return void
*/
private function upgradeVersionTwoZeroTwelve(CustomerSetup $customerSetup)
{
$customerSetup->updateAttribute('customer_address', 'vat_id', 'frontend_label', 'VAT Number');
}

/**
* @param ModuleDataSetupInterface $setup
* @return void
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Customer/etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Magento_Customer" setup_version="2.0.11">
<module name="Magento_Customer" setup_version="2.0.12">
<sequence>
<module name="Magento_Eav"/>
<module name="Magento_Directory"/>
Expand Down

0 comments on commit 4da47e6

Please sign in to comment.