Automattic\WooCommerce\Admin
PluginsHelper::get_installed_plugins_paths()
Get an array of installed plugins with their file paths as a key value pair.
Method of the class: PluginsHelper{}
No Hooks.
Return
Array
.
Usage
$result = PluginsHelper::get_installed_plugins_paths();
PluginsHelper::get_installed_plugins_paths() PluginsHelper::get installed plugins paths code WC 8.7.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; }