How to Check if a Module is Enabled or Not Programmatically in Magento 2

How to Check if a Module is Enabled or Not Programmatically in Magento 2

Many times, developers would come across a requirement to check if a module is enabled or disabled in a Magento 2 store.

It happens when one needs to check about the module’s status is a multi-store or when you are using third-party modules.

Use the isEnabled() function as shown below to check if a module is enabled or not programmatically in Magento 2.

Method to check if a module is enabled or not programmatically in Magento 2:

 

Note: The above method checks only if the module is enabled in the configuration or not. It does not support checking the status for the admin panel.

That’s it.

Any doubts? If so, do mention them in the Comments section below. I’d be happy to help.

Also, please share the solution with the Magento community via social media.

Thank you.

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

4.8
(based on 16 Reviews)

He is been with Meetanshi for more than two years now as a Magento developer. A silent guy whom you can always find solving clients' issues, is an avid reader too.

Leave a reply:

Your email address will not be published.