4

I created a custom product attribute which been used for a long time. Now the business need is, not to use it. I don't want to remove/delete it because I believe it will create a data integrity issue. So I created UpgradeData.php in My/Catalog/Setup directory.

I tried.

$eavSetup->updateAttribute(Product::ENTITY, $attrCode, 'visible', '0');
$eavSetup->updateAttribute(Product::ENTITY, $attrCode, 'is_visible_on_front', '0');

etc... And I didn't have any luck.

Any advice will be highly appreciated.

Thanks!

1 Answer 1

1

I found the solution. In case it helps someone...

$eavSetup->updateAttribute(Product::ENTITY, $attrCode, 'is_visible', '0');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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