Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
second_website_rollback.php
Go to the documentation of this file.
1 <?php
8 $registry->unregister('isSecureArea');
9 $registry->register('isSecureArea', true);
10 
12 $website = $objectManager->get(Magento\Store\Model\Website::class);
13 $website->load('test_website', 'code');
14 
15 if ($website->getId()) {
16  $website->delete();
17 }
18 
19 $registry->unregister('isSecureArea');
20 $registry->register('isSecureArea', false);
21 
22 $objectManager->get(\Magento\Store\Model\StoreManagerInterface::class)->reinitStores();