Change WooCommerce min password strength
Here we will learn how to change WooCommerce min password strength using custom snippet.
WooCommerce has a filter hook to manage WooCommerce min password strength.
Well I personally recommend you to not change password security level, because strong passwords are difficult to crack. but it depends on your choice so below we are discussing about the snippet that your need to add in your child theme’s functions.php file
There are 4 possible settings to change your WooCommerce passwords security. Where higher is strong and lower is weak.
/**
* @snippet Change WooCommerce password strength
* @author Deep Prakash Goyal
* @website https://wpexpertdeep.com/
*/
add_filter( 'woocommerce_min_password_strength', 'wpexpertdeep_change_password_strength' );
function wpexpertdeep_change_password_strength( $strength ) {
// 3 => Strong (default) | 2 => Medium | 1 => Weak | 0 => Very Weak (anything).
return 1;
}