Skip to main content
added 305 characters in body
Source Link

In my case the product class overrided Magento\Catalog\Model\Product and using

 $this->load($this->getId())->getData('My_Custom_Attribute'); 

to get my attribute because $this->getData('My_Custom_Attribute'); was returning Null;

Reloading the product cause to un-updating the product "using load() function"

so recheck your plugin and try to disable them 1 by 1

here is my problem: plugin code:

$product->load($product->getId()); //Here my main product get overrided

Replaced with:

 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
 $objectManager->create('Magento\Catalog\Model\Product')->load($product->getId());

In my case the product class overrided Magento\Catalog\Model\Product and using

 $this->load($this->getId())->getData('My_Custom_Attribute'); 

to get my attribute because $this->getData('My_Custom_Attribute'); was returning Null;

Reloading the product cause to un-updating the product "using load() function"

so recheck your plugin and try to disable them 1 by 1

In my case the product class overrided Magento\Catalog\Model\Product and using

 $this->load($this->getId())->getData('My_Custom_Attribute'); 

to get my attribute because $this->getData('My_Custom_Attribute'); was returning Null;

Reloading the product cause to un-updating the product "using load() function"

so recheck your plugin and try to disable them 1 by 1

here is my problem: plugin code:

$product->load($product->getId()); //Here my main product get overrided

Replaced with:

 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
 $objectManager->create('Magento\Catalog\Model\Product')->load($product->getId());
Source Link

In my case the product class overrided Magento\Catalog\Model\Product and using

 $this->load($this->getId())->getData('My_Custom_Attribute'); 

to get my attribute because $this->getData('My_Custom_Attribute'); was returning Null;

Reloading the product cause to un-updating the product "using load() function"

so recheck your plugin and try to disable them 1 by 1