Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $objectManager = MagentoFrameworkAppObjectManager::getInstance();
- $category_id = 'your_category_id';
- $collection = $objectManager ->get('MagentoCatalogModelCategory')->load($category_id);
- $collection->setData('is_active', 0);
- $collection->save();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement