I have to update and checked checkbox for use default field for product status. But I do not know how to update and checked that checkbox ? enter image description here here is my code

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

        $productId = 1;
        $status = 1;
        $store = 1;

        $product = $objectManager->create('Magento\Catalog\Model\Product')->load($productId);

        try {

        } catch (\Exception $e) {
            echo "Error Id : " . $productId;

fast solution, check this link https://webkul.com/blog/how-to-check-if-use-default-value-checked-for-a-product-attribute-value-in-magento-2/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.