when i am using catalog_product_save_before
and catalog_product_save_after
this two event it will always return catalogue_product_save_before
data.
when I am trying to fetch the child id from the parent id, it will give me old child ids instead of updated and other data also
Q:
how we can get updated data if we are use this two event
Code:
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$product = $objectManager->create('MagentoCatalogModelProduct')->load($product->getId());
$usedProducts = $product->getTypeInstance()->getUsedProducts($product);