Hello!
I am currently working on extending an existing module for Magento (the algolia search integration). In this module, I have access to a $subProducts variable containing a list of children products associated with a grouped product. The code the devs used is the following:
$subProducts = $typeInstance->getAssociatedProducts($product);
(more here: https://github.com/algolia/algoliasearch-magento-2/blob/d0ccc1d2cf9430c8a573a803fd1317419538a820/Hel...)
Anyhow, when I try to iterate through the $subProducts and try to access an attribute through $subProduct->getData("attribute_name_here"), I get a null value, with the exception of some attributes such as sku, for example.
How can I have access to other attributes in these sub products?
Thanks!