I would like to get my current product in my phtml. I saw lot of examples with registry in the Block file, but now, in M2.3, it's deprecated.
Someone have an idea how to do ?
My firm recently contacted Magento about this. According to them, there is no alternative way implemented yet.
try something like this:
$myBlock = \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\Catalog\Model\Session')->getData('last_viewed_product_id');
I found an article for depreciated registry in Magento 2.3. It is getting category from catalog session, I don't know if my code works or not but from this you will have a path where you need to do some debugging