Можете ли вы попробовать?
function validate_my_field($args, $user) {
// Test if this hook works when saving, then remove the line below
echo 'Hook works!';
if ( isset( $_POST['account_first_name'] ) && !ctype_alpha( $_POST['account_first_name'] ) ) {
$args->add( 'account_first_name_error', __( 'Only letters allowed.', 'woocommerce' ) );
}
}
add_action( 'woocommerce_save_account_details_errors','validate_my_field', 10, 2 );