Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
issaleable_product_rollback.php
Go to the documentation of this file.
1 <?php
7 require __DIR__ . '/multiple_products_rollback.php';
8 
11 
12 $registry->unregister('isSecureArea');
13 $registry->register('isSecureArea', true);
14 
17  ->create(\Magento\Catalog\Api\ProductRepositoryInterface::class);
18 
19 try {
20  $product = $productRepository->get('bundle-product');
22 } catch (\Magento\Framework\Exception\NoSuchEntityException $exception) {
23  //Product already removed
24 }
25 
26 $registry->unregister('isSecureArea');
27 $registry->register('isSecureArea', false);
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60