WC_Install::associate_plugin_file()
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 Install::associate plugin file WC 6.7.0
private static function associate_plugin_file( $plugins, $key ) { $path = explode( '/', $key ); $filename = end( $path ); $plugins[ $filename ] = $key; return $plugins; }