Automattic\WooCommerce\Admin
PluginsHelper::is_plugin_active
Checks if a plugin is active.
Method of the class: PluginsHelper{}
No Hooks.
Returns
true|false
.
Usage
$result = PluginsHelper::is_plugin_active( $plugin );
- $plugin(string) (required)
- Path to the plugin file relative to the plugins directory or the plugin directory name.
PluginsHelper::is_plugin_active() PluginsHelper::is plugin active code WC 9.9.5
public static function is_plugin_active( $plugin ) { $plugin_path = self::get_plugin_path_from_slug( $plugin ); return $plugin_path && \is_plugin_active( $plugin_path ); }