Automatically creates a WP user account at checkout, based on customer's email address.
This plugin now requires Easy Digital Downloads 2.9 or greater.
Once activated, EDD Auto Register will create a WordPress user account for your customer at checkout, without the need for the customer to enter any additional information. This eliminates the need for the default EDD registration form, and drastically reduces the time it takes your customers to complete their purchase.
Guest checkout is required so the plugin overrides the setting. The registration form is hidden on checkout while the plugin is active.
There are various filters available for developers, see the FAQ tab for more information.
More extensions for Easy Digital Downloads
You can find more extensions (both free and commercial) from Easy Digital Downloads’ website
wp-content/plugins/
folder locallywp-admin/plugins.php
on your site (your WP Admin plugin page)OR you can just install it with WordPress by going to Plugins >> Add New >> and type this plugin’s name
The standard purchase form which will create a user account from the customer's Email Address
The plugin's simple login form when both "Disable Guest Checkout" and "Show Register / Login Form?" are enabled
The error message that shows when "Disable Guest Checkout" is enabled, but "Show Register / Login Form?" is not
There are filters available to modify the behavior of the plugin:
Add the following to your child theme’s functions.php
function my_child_theme_edd_auto_register_email_subject( $subject ) { // enter your new subject below $subject = 'Here are your new login details'; return $subject; } add_filter( 'edd_auto_register_email_subject', 'my_child_theme_edd_auto_register_email_subject' );
Add the following to your child theme’s functions.php
function my_child_theme_edd_auto_register_email_body( $default_email_body, $first_name, $username, $password ) { $user = get_user_by( 'login', $username ); $key = get_password_reset_key( $user ); if ( is_wp_error( $key ) ) { return false; } // Modify accordingly $message = sprintf( __( 'Dear %s', 'edd-auto-register' ), $first_name ) . ",\n\n"; $message .= __( 'Below are your login details:', 'edd-auto-register' ) . "\n\n"; $message = sprintf( __( 'Your Username: %s', 'edd-auto-register' ), sanitize_user( $username, true ) ) . "\r\n\r\n"; $message .= __( 'To set your password, visit the following address:' ) . "\r\n\r\n"; $message .= network_site_url( 'wp-login.php?action=rp&key=' . $key . '&login=' . rawurlencode( $username ), 'login' ) . "\r\n\r\n"; $message .= sprintf( __( 'Login: %s', 'edd-auto-register' ), wp_login_url() ) . "\r\n"; return $message; } add_filter( 'edd_auto_register_email_body', 'my_child_theme_edd_auto_register_email_body', 10, 4 );
Add the following to your child theme’s functions.php to disable auto register based on the products purchased.
add_filter( 'edd_auto_register_can_create_user', 'prefix_auto_register_can_create_user', 10, 3 ); /** * Filters whether a user can be created for an order. * * @param bool $can_create_user * @param EDD_Payment $payment * @param string $user_name * @return bool */ function prefix_auto_register_can_create_user( $can_create_user, $payment, $user_name ) { // Set up the array of items in the cart. $items = array(); foreach ( $payment->cart_details as $item ) { $items[] = $item['id']; } // Which items are valid for creating a user account. $items_for_auto_register = array( 2092 ); // If there are no downloads that require auto register then disable it. if ( ! array_intersect( $items, $items_for_auto_register ) ) { return false; } return $can_create_user; }
There’s an option under downloads → settings → extensions
edd_auto_register_can_create_user
filter allows developers to modify whether a user can be created based on the payment data.