Automattic\WooCommerce\Admin

PluginsHelper::get_installed_plugins_paths()public staticWC 1.0

Get an array of installed plugins with their file paths as a key value pair.

{} It's a method of the class: PluginsHelper{}

No Hooks.

Return

Array.

Usage

$result = PluginsHelper::get_installed_plugins_paths();

Code of PluginsHelper::get_installed_plugins_paths() WC 7.1.0

public static function get_installed_plugins_paths() {
	$plugins           = get_plugins();
	$installed_plugins = array();

	foreach ( $plugins as $path => $plugin ) {
		$path_parts                 = explode( '/', $path );
		$slug                       = $path_parts[0];
		$installed_plugins[ $slug ] = $path;
	}

	return $installed_plugins;
}