Merge pull request #31701 from dhjw/autocomplete-signup

Enable browser-suggested passwords on checkout signup
This commit is contained in:
Peter Fabian 2022-02-01 18:40:06 +01:00 committed by GitHub
commit 2a4de35e24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 8 deletions

View File

@ -251,6 +251,7 @@ class WC_Checkout {
'label' => __( 'Account username', 'woocommerce' ), 'label' => __( 'Account username', 'woocommerce' ),
'required' => true, 'required' => true,
'placeholder' => esc_attr__( 'Username', 'woocommerce' ), 'placeholder' => esc_attr__( 'Username', 'woocommerce' ),
'autocomplete' => 'username',
); );
} }
@ -260,6 +261,7 @@ class WC_Checkout {
'label' => __( 'Create account password', 'woocommerce' ), 'label' => __( 'Create account password', 'woocommerce' ),
'required' => true, 'required' => true,
'placeholder' => esc_attr__( 'Password', 'woocommerce' ), 'placeholder' => esc_attr__( 'Password', 'woocommerce' ),
'autocomplete' => 'new-password',
); );
} }
$this->fields = apply_filters( 'woocommerce_checkout_fields', $this->fields ); $this->fields = apply_filters( 'woocommerce_checkout_fields', $this->fields );