From 5ae6d9a8d64786ad4141e14ccaaa505649235e1b Mon Sep 17 00:00:00 2001 From: Prince Ahmed <36558734+princeahmed@users.noreply.github.com> Date: Sun, 27 Oct 2019 00:07:31 +0600 Subject: [PATCH] remove unnecessary codes --- includes/class-wc-form-handler.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/class-wc-form-handler.php b/includes/class-wc-form-handler.php index 5aa43d31a85..70e0d32dc4d 100644 --- a/includes/class-wc-form-handler.php +++ b/includes/class-wc-form-handler.php @@ -989,9 +989,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( '' . esc_html( $creds['user_login'] ) . '', '' . esc_html( $creds['user_login'] ) . '', $message ); - throw new Exception( $message ); + throw new Exception( $user->get_error_message() ); } else { if ( ! empty( $_POST['redirect'] ) ) {