Merge pull request #13697 from DavidAnderson684/patch-3

Remove redundant / awkward empty password check
This commit is contained in:
Mike Jolley 2017-03-22 11:12:26 +00:00 committed by GitHub
commit 3297d706fa
1 changed files with 0 additions and 4 deletions

View File

@ -879,10 +879,6 @@ class WC_Form_Handler {
throw new Exception( '<strong>' . __( 'Error:', 'woocommerce' ) . '</strong> ' . __( 'Username is required.', 'woocommerce' ) );
}
if ( empty( $_POST['password'] ) ) {
throw new Exception( '<strong>' . __( 'Error:', 'woocommerce' ) . '</strong> ' . __( 'Password is required.', 'woocommerce' ) );
}
if ( is_email( $username ) && apply_filters( 'woocommerce_get_username_from_email', true ) ) {
$user = get_user_by( 'email', $username );