How to remove password strength checker from WordPress / WooCommerce
WooCommerce and WordPress have an integrated Password Strength Meter which forces users to use strong passwords. It loads the following files:
/wp-includes/js/zxcvbn.min.js
/wp-admin/js/password-strength-meter.min.js
If you’re running WooCommerce, the above file may be located here:
/wp-content/plugins/woocommerce/assets/js/frontend/password-strength-meter.min.js
Forcing users to think of a strong password on crucial pages like the cart or the checkout in order to login or register, may result in more abandoned carts and less orders to your store.
Note that it is not recommended to remove the password strength check for security reasons.
Luckily, the password strength parameters are editable and we can disable it by dequeue-ing the script for password strength.
PHP snippet: disable password strength meter in WooCommerce / WordPress
function webroom_wc_remove_password_strength() {
if ( wp_script_is( ‘wc-password-strength-meter’, ‘enqueued’ ) ) {
wp_dequeue_script( ‘wc-password-strength-meter’ );
}
}
add_action( ‘wp_print_scripts’, ‘webroom_wc_remove_password_strength’, 100 );
Add the code to your child theme’s functions.php file.
The article was originally published on webroom.tech