MAGENTO2

magento 2 how to check if module is enabled or disabled in phtml file

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$moduleManager = $objectManager->get(‘\Magento\Framework\Module\Manager’);
$xme = $moduleManager->isEnabled(‘Sparsh_AutoRelatedProducts’);
if( $xme==1)

{

echo “module enable”;

}

Leave a Reply

Your email address will not be published.

14 − 6 =