Merge pull request #21831 from jvanderveen/master

Fix for: WooCommerce Tax Rates (CSV) import does not work when entered path to file #21826
This commit is contained in:
Claudiu Lodromanean 2018-11-06 16:08:54 -05:00 committed by GitHub
commit 452e8bc065
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ class WC_Tax_Rate_Importer extends WP_Importer {
*/
public function handle_upload() {
// phpcs:disable WordPress.CSRF.NonceVerification.NoNonceVerification -- Nonce already verified in WC_Tax_Rate_Importer::dispatch()
$file_url = isset( $_POST['file_url'] ) ? esc_url_raw( wp_unslash( $_POST['file_url'] ) ) : '';
$file_url = isset( $_POST['file_url'] ) ? wc_clean( wp_unslash( $_POST['file_url'] ) ) : '';
if ( empty( $file_url ) ) {
$file = wp_import_handle_upload();