• Hi,
    On checkout page the account password should be atleast 8 character only i dont need 12 character. and also i need create account should always be expanded only by default expanded.

Viewing 7 replies - 1 through 7 (of 7 total)
  • By default, WooCommerce requires a level 3 password. You can down grade this to level 2 with this code:
    add_filter( 'woocommerce_min_password_strength', create_function( '', 'return 2;' ) );
    The code goes in functions.php for your child theme or you can use the “My Custom Functions” plugin.

    Please explain the second point again.

    Thread Starter dmishra

    (@dmishra)

    Hi,
    On checkout page the account password should not be more than 8 characters only.
    The code which you have given will work not be more than 8 characters
    add_filter( ‘woocommerce_min_password_strength’, create_function( ”, ‘return 2;’ ) );

    I don’t think it works just on password length. That’s just one factor. The code is looking at other things, like whether the password has a number, a capital or a special character. It then calculates whether the password is strong / medium / weak.

    The possible values in the function are:
    3 strong = default
    2 medium
    1 weak or anything

    There are some password plugins around that you can try. They may give you more control.

    Thread Starter dmishra

    (@dmishra)

    Actually i need total 8 characters password which included number, letter and special character. In 8 characters i need strong, medium, weak password.

    Your choices are only password strength settings of 3 (default), 2 or 1. Using just WooCommerce functions, you cannot specify the password more than that.

    A level 2 password might be only 7 characters, or more than 8 if its a simple password.

    For more control, have a look for password plugins at www.ads-software.com/plugins and codecanyon.net

    Thread Starter dmishra

    (@dmishra)

    Can i restrict password strength setting to 8 character only. can you share a code to me.
    example if user type password less than 8 character it should give error (please enter maximum 8 character) and also if user type password more than 10 character it should give error (please enter maximum 8 character) only.

    Sorry, no. Its unlikely someone would do that code development by way of a forum answer. Have a look for a password plugin, otherwise you may need to get a developer.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Customer can register at checkout with a 8 character password’ is closed to new replies.