I am attempting to make use of the registration_errors filter to filter consumer registration in a woocommerce’s store. Nevertheless it’s not working. That is the take a look at code that I am utilizing however nothings occurs:
add_filter( 'registration_errors', 'my_registration_errors', 10, 3 );
perform my_registration_errors( $errors, $sanitized_user_login, $user_email ) {
if ( true ) {
$errors->add( 'error_test', 'Error message' );
}
return $errors;
}
I am doing the consumer registration by the /my-account/ web page of Woocommerce.
I haven’t got some other plugins apart from Woocommerce and Code Snippets.
Possibly I would like to make use of one other filter if I am utilizing Woocommerce?