Skip to content

Instantly share code, notes, and snippets.

@eduwass
Last active January 11, 2018 03:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eduwass/e1dbfd786414aa3ef869aeac6c67bfb5 to your computer and use it in GitHub Desktop.
Save eduwass/e1dbfd786414aa3ef869aeac6c67bfb5 to your computer and use it in GitHub Desktop.
Lower password strength requirements in WooCommerce
<?php
// Allow Weaker passwords
add_filter( 'woocommerce_min_password_strength', 'uh_oh_weakpasswords' );
function uh_oh_weakpasswords() {
return 1;
}
<?php
// define the woocommerce_login_form_end callback
function action_woocommerce_login_form_end( ) {
// Depends on WordPress Social Login
// https://wordpress.org/plugins/wordpress-social-login/
if ( shortcode_exists( 'wordpress_social_login' ) ) {
do_action( 'wordpress_social_login' );
}
};
// add the action
add_action( 'woocommerce_login_form_end', 'action_woocommerce_login_form_end', 10, 0 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment