Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Easy Digital Downloads - Force minimum password length at checkout
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
You can’t perform that action at this time.