woocommerce_registration_error_email_exists
Filter the notice shown when a customer tries to register with an existing email address.
Использование
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(строка)
- The notice.
- $email(строка)
- The email address.
Список изменений
| С версии 3.3.0 | Введена. |
Где вызывается хук
woocommerce_registration_error_email_exists
woocommerce/includes/class-wc-checkout.php 1310
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