How to get extension version in Magento 2?

In order to retrieve version of any extension/module in Magento 2, you can use following code snippet.

$versionInfo =  $this->_objectManager->get('Magento\Framework\Module\ModuleList')->getOne('Wallet_Version');

echo "<pre>";
print_r($versionInfo);
echo "</pre>";

Here, Wallet is vendor name and Version is module name.

1 Comment

  1. Nice Work. I love your blog. Great job team.

Leave a Reply

Your email address will not be published. Required fields are marked *