Automattic\WooCommerce\Admin

PluginsHelper::get_installed_plugin_slugs()public staticWC 1.0

Get an array of installed plugin slugs.

Method of the class: PluginsHelper{}

No Hooks.

Return

Array.

Usage

$result = PluginsHelper::get_installed_plugin_slugs();

PluginsHelper::get_installed_plugin_slugs() code WC 8.6.1

public static function get_installed_plugin_slugs() {
	return array_map(
		function ( $plugin_path ) {
			$path_parts = explode( '/', $plugin_path );

			return $path_parts[0];
		},
		array_keys( get_plugins() )
	);
}