Inside the process_login
function, you should be able to see a try {} catch {}
block which then calls wc_add_notice
like this:
...
wc_add_notice( apply_filters('login_errors', $e->getMessage() ), 'error' );
...
So, we should be able to add a filter and intercept just that message:
function replace_email_error($message) {
$emailError = '<strong>' . __( 'Error', 'woocommerce' ) . ':</strong> ' . __( 'A user could not be found with this email address.', 'woocommerce');
if ($message == $emailError) {
$message = 'MESSAGE TO BE REPLACED';
}
return $message;
}
add_filter('login_errors', 'replace_email_error');
I have not tested this - please try it out, if you have any problems with it I am happy to debug.
Alternatively, you should be able to see that the error message is passed to Wordpress's localization functions - so you can also add a filter to the gettext
function and then check the domain and the text and return a different value if they match.