In this post I am going to explain how to get Magento 2 edition and version. 1. Using Dependency Injection Add below code snippet in Block class. protected $_productMetadataInterface; public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\App\ProductMetadataInterface $productMetadataInterface, array $data = [] ) { $this->_productMetadataInterface = $productMetadataInterface; parent::__construct($context, $data); } /* Get Magento 2 Edition */ public…


Recent Comments