Last active
August 29, 2015 14:05
-
-
Save amdrew/1e62e7c13cc06260d2b8 to your computer and use it in GitHub Desktop.
Easy Digital Downloads - Force minimum password length at checkout
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 | |
function sumobi_edd_set_minimum_password_length( $valid_data, $post_data ) { | |
if ( strlen( $post_data['edd_user_pass'] ) < 8 ) { | |
edd_set_error( 'password_too_short', __( 'Please enter a password of 8 characters or more.', 'edd' ) ); | |
} | |
} | |
add_action( 'edd_checkout_error_checks', 'sumobi_edd_set_minimum_password_length', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment