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!