Last active
January 11, 2018 03:14
-
-
Save eduwass/e1dbfd786414aa3ef869aeac6c67bfb5 to your computer and use it in GitHub Desktop.
Lower password strength requirements in WooCommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Allow Weaker passwords | |
add_filter( 'woocommerce_min_password_strength', 'uh_oh_weakpasswords' ); | |
function uh_oh_weakpasswords() { | |
return 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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