WordPress at Your Fingertips
function is not described

WC_Install::associate_plugin_file() private WC 1.0

Get slug from path and associate it with the path.

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

No Hooks.

Return

null. Nothing.

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.

Code of WC_Install::associate_plugin_file() WC 5.7.0

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