I can’t validate the custom fields in my plugin. I want to skip some registration on WordPress. My code snippet is here:
add_filter( 'registration_errors', 'reg_user_register', 10, 3);
function reg_user_register($errors, $sanitized_user_login, $user_email){
global $wpdb;
echo "<pre>"; /*need the values that are post from registration page*/
print_r($_POST);
exit();}
}
You are not using the registration_errors hook properly. It should look like this: