I'm trying to remove this registration error 'registration-error-email-exists' from woocommerce/wp error. Tried several options but couldn't figure out the solution. So any solutions without editing the wc core plugin file would be appriciated(as by editing the core plugin file a little solves my issue but I want to a proper solution).
So far I've tried
function wp_kama_woocommerce_registration_errors_filter( $errors, $email ){
$errors = $errors->remove('registration-error-email-exists');
return $errors;
}
add_filter( 'woocommerce_registration_errors', 'wp_kama_woocommerce_registration_errors_filter', 10, 4 );
But it seems not working, below are the reference I've followed so far Ref 1 Ref 2
Related woocommerce file: woocommerce/includes/wc-user-functions.php