Remove "wc_error" query string after login process

Closes #17957
This commit is contained in:
Claudio Sanches 2017-11-29 19:57:59 -02:00
parent b05cd3f3a7
commit 41335ae9b5
1 changed files with 1 additions and 1 deletions

View File

@ -974,7 +974,7 @@ class WC_Form_Handler {
$redirect = wc_get_page_permalink( 'myaccount' );
}
wp_redirect( wp_validate_redirect( apply_filters( 'woocommerce_login_redirect', $redirect, $user ), wc_get_page_permalink( 'myaccount' ) ) );
wp_redirect( wp_validate_redirect( apply_filters( 'woocommerce_login_redirect', remove_query_arg( 'wc_error', $redirect ), $user ), wc_get_page_permalink( 'myaccount' ) ) );
exit;
}
} catch ( Exception $e ) {