woocommerce_registration_error_email_exists
Filter the notice shown when a customer tries to register with an existing email address.
Usage
add_filter( 'woocommerce_registration_error_email_exists', 'wp_kama_woocommerce_registration_error_email_exists_filter', 10, 2 ); /** * Function for `woocommerce_registration_error_email_exists` filter-hook. * * @param string $message The notice. * @param string $email The email address. * * @return string */ function wp_kama_woocommerce_registration_error_email_exists_filter( $message, $email ){ // filter... return $message; }
- $message(string)
- The notice.
- $email(string)
- The email address.
Changelog
Since 3.3.0 | Introduced. |
Where the hook is called
woocommerce_registration_error_email_exists
woocommerce/includes/class-wc-checkout.php 1165
throw new Exception( apply_filters( 'woocommerce_registration_error_email_exists', __( 'An account is already registered with your email address. <a href="#" class="showlogin">Please log in.</a>', 'woocommerce' ), $data['billing_email'] ) ); // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped