WooCommerce PHP Beginner Requires WooCommerce

Remove the Password Strength Meter on Checkout

Stop loading WooCommerce's password strength meter on the front end, which removes a large script from checkout and My Account.

Tested on WordPress 7.1 PHP 8.3 Updated
functions.php 5 lines
add_action( 'wp_print_scripts', function (): void {
	if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) {
		wp_dequeue_script( 'wc-password-strength-meter' );
	}
}, 100 );

Where to add this

Recommended A code snippets plugin Survives theme changes and is easy to switch off.
Child theme At the end of your child theme's functions.php file.
Must-use plugin As a .php file in wp-content/mu-plugins, starting with <?php.

Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.

WooCommerce shows a password strength meter when customers create an account. It loads WordPress’s zxcvbn library, around 800 KB, and strictly refuses weak passwords, which can frustrate shoppers. This snippet removes it.

How it works

The meter is the wc-password-strength-meter script. Removing it just before scripts are printed stops the meter and its dependency from loading on checkout and My Account. WooCommerce’s server-side password checks still run.

Things to watch

  • This makes it easier for customers to choose weak passwords. Weigh that against conversion. A middle ground is to keep the meter but lower the required strength with the woocommerce_min_password_strength filter (0 to 4, default 3).
  • If your checkout doesn’t let customers set a password, the meter never loads anyway.

How to test it

Open checkout in a private window, view the source and search for zxcvbn. It shouldn’t be loaded.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only