WooCommerce Code Reference

PluginsProviderInterface

Plugins Provider Interface

Table of Contents

get_active_plugin_slugs()  : array<string|int, mixed>
Get an array of active plugin slugs.
get_plugin_data()  : array<string|int, mixed>|false
Get plugin data.
get_plugin_path_from_slug()  : string|false
Get the path to the plugin file relative to the plugins directory from the plugin slug.

Methods

get_plugin_data()

Get plugin data.

public get_plugin_data(string $plugin) : array<string|int, mixed>|false
Parameters
$plugin : string

Path to the plugin file relative to the plugins directory or the plugin directory name.

Return values
array<string|int, mixed>|false

get_plugin_path_from_slug()

Get the path to the plugin file relative to the plugins directory from the plugin slug.

public get_plugin_path_from_slug(string $slug) : string|false

E.g. 'woocommerce' returns 'woocommerce/woocommerce.php'

Parameters
$slug : string

Plugin slug to get path for.

Return values
string|false