I would like to have some Magento product attributes that are not editable from the admin interface and some that are not visible at all in that interface (as a method of st
etc\adminhtml\events.xml
Observer\Lock.php
namespace Vendor\Module\Observer;
class Lock implements \Magento\Framework\Event\ObserverInterface
{
public function execute(\Magento\Framework\Event\Observer $observer)
{
$event = $observer->getEvent();
$product = $event->getProduct();
$product->lockAttribute('attribute_code');
}
}