Merge pull request #19987 from woocommerce/fix/plugin-install-get-proper-plugin-filename
Plugin installer: fix extracting filename from path
This commit is contained in:
commit
9e1b8245be
|
@ -1086,8 +1086,9 @@ CREATE TABLE {$wpdb->prefix}woocommerce_termmeta (
|
|||
* @param string $key Plugin relative path. Example: woocommerce/woocommerce.php.
|
||||
*/
|
||||
private static function associate_plugin_file( $plugins, $key ) {
|
||||
$path = explode( '/', $key );
|
||||
$plugins[ $path[1] ] = $key;
|
||||
$path = explode( '/', $key );
|
||||
$filename = end( $path );
|
||||
$plugins[ $filename ] = $key;
|
||||
return $plugins;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue