Users creating passwords (Weak – Please enter a stronger password.)
-
Hi, Users creating passwords are unable to do so as it comes up with Weak – Please enter a stronger password.
This is a bit extreme because I’ve tried and the passwords I’ve used on other things which all work just fine are being rejected and need so many extra letters/numbers for the site to accept them. Can I change this?
Thanks,
It’s default wordpress behavior to enforce strong passwords.
To disable this function add this snippet on your snippets plugin or on your child theme functions.php file.
/**
* Remove password strength check.
*/
function woodmart_remove_password_strength() {
wp_dequeue_script( 'wc-password-strength-meter' );
}
add_action( 'wp_print_scripts', 'woodmart_remove_password_strength', 10 );
To be honest I only know who to add to the themes Customs CSS setting, how do I add this ‘snippets’ or how do I access the functions.php file in the child theme?
Install this plugin and add the snippet there.
https://wordpress.org/plugins/code-snippets/
Also if you want you can lower the strength requirement by changing the number after return to the corresponding below. Use this snippet OR the previous one.
/**
* Change the strength requirement on the woocommerce password
*
* Strength Settings
* 4 = Strong
* 3 = Medium (default)
* 2 = Also Weak but a little stronger
* 1 = Password should be at least Weak
* 0 = Very Weak / Anything
*/
add_filter( 'woocommerce_min_password_strength', 'woodmart_change_password_strength' );
function woodmart_change_password_strength( $strength ) {
return 4;
}