WC_Install::associate_plugin_file()private staticWC 1.0

Get slug from path and associate it with the path.

Метод класса: WC_Install{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = WC_Install::associate_plugin_file( $plugins, $key );
$plugins(массив) (обязательный)
Associative array of plugin files to paths.
$key(строка) (обязательный)
Plugin relative path. Example: woocommerce/woocommerce.php.

Код WC_Install::associate_plugin_file() WC 8.7.0

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