• Hi, it seems that the check on deactivating VAT number verification is not taken into consideration if the field is added to the user registration form. Even if you deactivate verification, it is still carried out and therefore it is impossible to register with an incorrect VAT number.
    The message is always “VAT invalid” even with validation disabled.
    In checkout, however, disabling verification works correctly.

    WP 6.3.2
    Woocommerce 8.2.1
    EU/UK VAT for WooCommerce 2.9.13

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi There,

    We hope you are doing well.

    Have you selected the option where the VAT field is set as optional, as shown in the attached screenshot?

    I tested this option and did not encounter any errors. It allowed me to register even when the VAT number was incorrect.

    If you try selecting this option and the issue continues to persist, please let me know.

    Thank you for your cooperation and time.

    Thread Starter citycentertv

    (@citycentertv)

    Hi, thanks for the reply. Yes, I confirm, actually by setting it as optional you can proceed with an incorrect VAT number.
    However, since I would still like the insertion of a VAT number to be mandatory, even if not validated, is the only way to proceed by manually modifying the form to make the field mandatory?

    Hi there,

    I submitted your request to our development Team and it will be considered.

    I will get back to you if there any update.

    Thank you for your cooperation and time.

    Hi there,

    I’m glad to tell you that our development team has found a solution for this.
    You can update to the latest version and it will work for you,


    Thank you,

    Thread Starter citycentertv

    (@citycentertv)

    Hi, great news thanks a lot!
    I did some tests and I think one situation remains out:

    If I add the field to the registration form, disable the validity check and set the field as “required”, this is mandatory in the checkout correctly, but not in the registration form, although the field label has the indication as required. By entering only the username and password, without entering the vat number, no error is given and the account is created anyway. I solved it with this code:

    // registration Field validation
    function fn_woo_account_registration_field_validation(
        $errors,
        $username,
        $email
    ) {
        if (isset($_POST["billing_eu_vat_number"]) && empty($_POST["billing_eu_vat_number"])) {
            $errors->add(
                "vat_number_error",
                __("<strong>VAT Number</strong> is mandatory!", "eu-vat-for-woocommerce")
            );
        }
        return $errors;
    }
    add_filter("woocommerce_registration_errors","fn_woo_account_registration_field_validation",10,3);

    Hi,

    I have notified the development Team of your alert.

    Thank you.

    • This reply was modified 1 year, 4 months ago by Abd Hindi.
    • This reply was modified 1 year, 4 months ago by Abd Hindi.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Vat verification always enabled on registration form’ is closed to new replies.