I have a couple store views that represent other languages, and I'm trying to get product attributes consisting of my site language. How do we retrieve product attributes from the admin store (store id 0)? I think I understand that we can switch between stores within a product, but the values retrieved are not from the admin store. My admin store product name is "A bunch of bananas."
$productId = $observer->getProduct()->getId();
$theProduct = $this->_productRepository->getById($productId);
$theProduct->setStoreId(0); //Set the admin store id
$value = $theProduct->getData('name');
$value is returned as "Un racimo de plátanos", which is not from my admin store.
I've tried the method outlined in this ticket as well.
getAttributeText() use default value regardless what store view the user is on