Merge pull request #17790 from mensmaximus/patch-2

Fix method upload_dir in class WC_Admin_Post_Types
This commit is contained in:
Mike Jolley 2017-11-20 11:16:05 +00:00 committed by GitHub
commit deeadccf78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -769,11 +769,11 @@ class WC_Admin_Post_Types {
$pathdata['url'] = $pathdata['url'] . '/woocommerce_uploads';
$pathdata['subdir'] = '/woocommerce_uploads';
} else {
$new_subdir = '/woocommerce_uploads' . $uploads['subdir'];
$new_subdir = '/woocommerce_uploads' . $pathdata['subdir'];
$uploads['path'] = str_replace( $uploads['subdir'], $new_subdir, $uploads['path'] );
$uploads['url'] = str_replace( $uploads['subdir'], $new_subdir, $uploads['url'] );
$uploads['subdir'] = str_replace( $uploads['subdir'], $new_subdir, $uploads['subdir'] );
$pathdata['path'] = str_replace( $pathdata['subdir'], $new_subdir, $pathdata['path'] );
$pathdata['url'] = str_replace( $pathdata['subdir'], $new_subdir, $pathdata['url'] );
$pathdata['subdir'] = str_replace( $pathdata['subdir'], $new_subdir, $pathdata['subdir'] );
}
}
return $pathdata;