Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Allow Woocommerce users to have duplicate email adress WordPress

  • SOLVED

I am using Woocommerce and I need to modify the function that checks if an email is a duplicate.

I need Woocommerce to allow users to have duplicate email adresses.

Does anyone know how to do this?

Answers (1)

2016-04-17

Reigel Gallarde answers:

woocommerce users/customers are based on native wordpress users... so this plugin might help you [[LINK href="https://wordpress.org/plugins/allow-multiple-accounts/"]]https://wordpress.org/plugins/allow-multiple-accounts/[[/LINK]]


shnactor comments:

Thank you.

I have tried this plugin, but Woocommerce does still not allow duplicate email address when checking out, even when using this plugin.


Reigel Gallarde comments:

well, currently there's no way to get away with how woocommerce handle customers in terms of duplicate emails... there's no hook available..

but using that plugin and editing woocommerce file will let you have what you want...

you can edit plugins\woocommerce\includes\wc-user-functions.php and remove these lines:

if ( email_exists( $email ) ) {
return new WP_Error( 'registration-error-email-exists', __( 'An account is already registered with your email address. Please login.', 'woocommerce' ) );
}


not advisable though.. but can be done for the meantime... then you just have to remember to edit the same file in all coming updates of woocommerce...


shnactor comments:

Thank you

Great answer