I have one more question about this topic:
How to display validation error i Woocomerce 2.1?
Because $woocommerce->add_error is not working.
Now a have something like this:
add_filter('woocommerce_registration_errors', 'shop_registration_errors');
function shop_registration_errors() {
extract($_POST);
if ($firstname == '') {
return new WP_Error('registration-error', __('Message.', 'woocommerce'));
}
}
This function displays errors now improved, but after pressing the submit button, I get only a white screen and the user is not added to the database.