Being a store owner, you may have leveraged default product attributes or created product attributes in Magento 2 to address product specific needs.
In most of the cases, a store is administered by multiple users by allowing multiple admin login in Magento 2 and there may be the chances of deleting some products, categories, product attributes or any important functionality by mistake by any of the admin users. To avoid the same, the admin may want to remove “Delete Attribute” option from Product Attribute in Magento 2.
The default Magento 2 does not allow to remove the “Delete Attribute” option from the product attribute. And thus, the post explains stepwise method to remove “Delete Attribute” option from product attribute in Magento 2.
Stepwise Method to Remove “Delete Attribute” Option from Product Attribute in Magento 2
Let’s say, you have created a product attribute named “Color” and you want to remove the “Delete Attribute” for the same. Follow the below steps to remove “Delete Attribute” option for the color product attribute.
- Open your database and search eav_attribute table.
- In the eav_attribute table, search the color attribute and find column “is_user_defined”.
- Set “is_user_defined” to 0
Now move to the product attribute edit page, and you can see the “Delete Attribute” option is removed.
Done. Removing the “Delete Attribute” option from product attribute will no longer allow anyone to delete the attribute.
Having a query? Feel free to ask in the Comment section below.
I would be happy to answer.
Do consider sharing the post with Magento Community via social media.
Get Weekly Updates
Never miss Magento tips, tricks, tutorials, and news.
Thank you for subscribing.
Something went wrong.