Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-inventory-sales-api
Test
_files
websites_with_stores_rollback.php
Go to the documentation of this file.
1
<?php
7
declare(strict_types=1);
8
9
use
Magento\Framework\Registry
;
10
use
Magento\Store\Model\Website
;
11
use
Magento\TestFramework\Helper\Bootstrap
;
12
14
$registry
= Bootstrap::getObjectManager()->get(Registry::class);
15
16
$registry
->unregister(
'isSecureArea'
);
17
$registry
->register(
'isSecureArea'
,
true
);
18
19
$websiteCodes
= [
'eu_website'
,
'us_website'
,
'global_website'
];
20
21
foreach
(
$websiteCodes
as
$websiteCode
) {
23
$website
= Bootstrap::getObjectManager()->create(Website::class);
24
$website
->load(
$websiteCode
,
'code'
);
25
if
(
$website
->getId()) {
26
$website
->delete();
27
}
28
}
29
30
$registry
->unregister(
'isSecureArea'
);
31
$registry
->register(
'isSecureArea'
,
false
);
Magento\TestFramework\Helper\Bootstrap
Definition:
Bootstrap.php:12
$website
$website
Definition:
payment_configuration_rollback.php:38
Magento\Store\Model\Website
Definition:
Website.php:26
$registry
$registry
Definition:
websites_with_stores_rollback.php:14
$websiteCodes
$websiteCodes
Definition:
websites_with_stores_rollback.php:19
Magento\Framework\Registry
Definition:
Registry.php:18
$websiteCode
if(!isset($_GET['website_code'])) $websiteCode
Definition:
website.php:11