Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
product_configurable_with_disabled_child.php
Go to the documentation of this file.
1 <?php
9 
10 require __DIR__ . '/product_configurable.php';
11 
13 $productRepository = Bootstrap::getObjectManager()
14  ->create(ProductRepositoryInterface::class);
15 
16 $product = $productRepository->get('simple_1020');
17 $product->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_DISABLED);
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60