Skip to content

Instantly share code, notes, and snippets.

@mattradford
Forked from BurlesonBrad/functions.php
Created December 22, 2016 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattradford/f570bc53e3ccef63e66d071c9fbd2dfb to your computer and use it in GitHub Desktop.
Save mattradford/f570bc53e3ccef63e66d071c9fbd2dfb to your computer and use it in GitHub Desktop.
Reduce or remove WooCommerce 2.5 minimum password strength requirement for creating a user account. Warning: Use at your own risk.
<?php
/**
*Reduce the strength requirement on the woocommerce password.
*
* Strength Settings
* 3 = Strong (default)
* 2 = Medium
* 1 = Weak
* 0 = Very Weak / Anything
*/
function reduce_woocommerce_min_strength_requirement( $strength ) {
return 2;
}
add_filter( 'woocommerce_min_password_strength', 'reduce_woocommerce_min_strength_requirement' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment