Skip to content

Instantly share code, notes, and snippets.

@PiotrKrzyzek
Created November 3, 2018 00:43
Show Gist options
  • Save PiotrKrzyzek/99c051c954f8e5949328f377daed7351 to your computer and use it in GitHub Desktop.
Save PiotrKrzyzek/99c051c954f8e5949328f377daed7351 to your computer and use it in GitHub Desktop.
Reduce WooCommerce Password Strength Requirement
add_filter( 'woocommerce_min_password_strength', 'example_woocommerce_min_password_strength' );
/**
* Callback for WooCommerce 'woocommerce_min_password_strength' filter.
*
* Reduce the strength requirement on the woocommerce password.
*
* 0 = Anything (not a good idea)
* 1 = Weak
* 2 = Medium
* 3 = Strong (default)
*
* @param integer $strength
*
* @return integer
*/
function example_woocommerce_min_password_strength( $strength ) {
return 2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment