Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
category_product_rollback.php
Go to the documentation of this file.
1 <?php
9 $registry->unregister('isSecureArea');
10 $registry->register('isSecureArea', true);
11 
14 $product->load(333);
15 if ($product->getId()) {
16  $product->delete();
17 }
18 
21 $category->load(333);
22 if ($category->getId()) {
23  $category->delete();
24 }