WC_Install::associate_plugin_file()private staticWC 1.0

Get slug from path and associate it with the path.

Method of the class: WC_Install{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = WC_Install::associate_plugin_file( $plugins, $key );
$plugins(array) (required)
Associative array of plugin files to paths.
$key(string) (required)
Plugin relative path. Example: woocommerce/woocommerce.php.

WC_Install::associate_plugin_file() code WC 9.4.2

private static function associate_plugin_file( $plugins, $key ) {
	$path                 = explode( '/', $key );
	$filename             = end( $path );
	$plugins[ $filename ] = $key;
	return $plugins;
}