Is is a common issue to try to fetch data from objects like products with $product->getData('attribute') but depending on the source of those objects (for example if they come from an collection) the attribute is not loaded.
I would suggest to at least add a warning
if (!$this->hasData('attribute')) {
$logger->warning('Trying to access not existing / not loaded attribute');
}
This would improve the developer experience.
Is is a common issue to try to fetch data from objects like products with
$product->getData('attribute')but depending on the source of those objects (for example if they come from an collection) the attribute is not loaded.I would suggest to at least add a warning
This would improve the developer experience.