Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
date_attribute_rollback.php
Go to the documentation of this file.
1 <?php
7 /* Create attribute */
10  \Magento\Catalog\Setup\CategorySetup::class,
11  ['resourceName' => 'catalog_setup']
12 );
14 
15 $registry->unregister('isSecureArea');
16 $registry->register('isSecureArea', true);
17 
20 $product = $product->loadByAttribute('sku', 'simple_product_with_date_attribute');
21 if ($product->getId()) {
22  $product->delete();
23 }
24 
27  \Magento\Catalog\Model\ResourceModel\Eav\Attribute::class
28 );
29 $attribute->loadByCode($installer->getEntityTypeId('catalog_product'), 'date_attribute');
30 if ($attribute->getId()) {
31  $attribute->delete();
32 }
33 
34 $registry->unregister('isSecureArea');
35 $registry->register('isSecureArea', false);