$plugin_activation ) { if ( preg_match( '/.+\/' . $plugin_main_file . '/', $plugin_name ) ) { $is_plugin_active = true; break; } } return $is_plugin_active; } /** * Check if a must use (mu) plugin exists. * * mu plugins are always active. So there's no need to check if they are * active or not. We just need to check that they are in the list. * * @param string $plugin_main_file main file of the plugin, eg. woocommerce.php * @return bool True if plugin matches, false otherwise. */ public static function is_mu_active( $plugin_main_file ) { $_mu_plugins = get_mu_plugins(); if ( isset( $_mu_plugins[ $plugin_main_file ] ) ) { return true; } return false; } }