Merge pull request #24907 from princeahmed/master

remove unnecessary codes
This commit is contained in:
Claudio Sanches 2020-01-30 15:32:30 -03:00 committed by GitHub
commit 0883b5b977
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -1010,9 +1010,7 @@ class WC_Form_Handler {
$user = wp_signon( apply_filters( 'woocommerce_login_credentials', $creds ), is_ssl() );
if ( is_wp_error( $user ) ) {
$message = $user->get_error_message();
$message = str_replace( '<strong>' . esc_html( $creds['user_login'] ) . '</strong>', '<strong>' . esc_html( $creds['user_login'] ) . '</strong>', $message );
throw new Exception( $message );
throw new Exception( $user->get_error_message() );
} else {
if ( ! empty( $_POST['redirect'] ) ) {