This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('woocommerce_process_registration_errors', 'clario_override_registration_error_messages', 999,4); | |
// woocommerce_process_registration_errors fires before the username and email already exist check (so in a sense it is too early), | |
// however once these checks happen, the code immediate throws an error and returns so no later hooks are available to handle | |
// changing the error messages | |
function clario_override_registration_error_messages($errors,$username, $password, $email) { | |
if ( username_exists( $username ) ) { |