Are you looking for a way to customize Easy Digital Downloads user verification emails that you want to send out to your customers? While there’s probably a plugin for this, we have created a quick code snippet that you can use to customize Easy Digital Downloads user verification emails.
Instructions:
All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin:
function jp_customize_verification_email( $message, $user_id ) { $user_data = get_userdata( $user_id ); $url = edd_get_user_verification_url( $user_id ); $from_name = edd_get_option( 'from_name', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) ); $message = sprintf( __( "Howdy %s,\n\nYour account with %s needs to be verified before you can access your purchase history. <a href='%s'>Click here</a> to verify your account and get access to your purchases.", 'edd' ), $user_data->display_name, $from_name, $url ); return $message; } add_filter( 'edd_user_verification_email_message', 'jp_customize_verification_email', 10, 2 );
Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly add code snippets in WordPress, so you don’t accidentally break your site.
If you liked this code snippet, please consider checking out our other articles on the site like: 30 ways to make money online and how to add a portfolio to your WordPress site.
Thanks for the snippet! Is there a way to modify this to disable the user verification email entirely?