Skip to content
Check if a WordPress plugin is active
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Check If a Plugin is Active

On a WordPress site, plugins can be (1) activated on the site, (2) network activated on a multisite and (3) added as a must use plugin. This class adds method to check if a plugin is active in all these cases.

Please, read the associated blog post.


// Check if WooCommerce is active.
Utils_Plugins::is_active('woocommerce.php'); //True|False

// Check if WooCommerce is network active.
Utils_Plugins::is_network_active('woocommerce.php'); //True|False

// Check if a plugin is added as must use (mu-plugins).
Utils_Plugins::is_mu_active('plugin.php');  //True|False
You can’t perform that action at this time.