Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
configurable_attribute_rollback.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
10 
11 $registry->unregister('isSecureArea');
12 $registry->register('isSecureArea', true);
13 
15 $attribute = $eavConfig->getAttribute('catalog_product', 'test_configurable');
16 if ($attribute instanceof \Magento\Eav\Model\Entity\Attribute\AbstractAttribute
17  && $attribute->getId()
18 ) {
19  $attribute->delete();
20 }
21 $eavConfig->clear();
22 
23 $registry->unregister('isSecureArea');
24 $registry->register('isSecureArea', false);
foreach($productCollection as $product) $eavConfig