Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Diego

    (@daigo75)

    I’m not sure I understand the question, but I will try to answer. The EU VAT Assistant can stop the checkout when the VAT number is not valid and shows an error message about that.

    If you wish to show a warning somewhere, while the customer is typing the VAT number on the checkout page, you can write some JavaScript to intercept event wc_aelia_euva_eu_vat_number_validation_complete. You can use the following template as a starting point:

    
    jQuery(document).on('wc_aelia_euva_eu_vat_number_validation_complete', function(event, response) {
      // When the VAT number is valid, response.valid is true
    });
    
    Thread Starter reset-informatica

    (@reset-informatica)

    Hi Diego, thanks for your reply.
    On my site the plugin doesn’t show an error message.
    You could try here http://portesinvisibles.fr
    Regards

    Plugin Author Diego

    (@daigo75)

    The error is displayed when the customer tries to complete the checkout after selecting an EU country and entering an invalid VAT number. For that message to appear, the VAT number should be set as either “optional” or “required” in the plugin settings, and option “Store invalid VAT numbers” must be disabled. Here’s an example of such message: https://prnt.sc/nvas0g

    Please note that the EU VAT Assistant doesn’t attempt to validate a VAT number that is too short (it should be 9 characters long at least). This is a change that we added recently. I will ask to check if that might cause the VAT number to just be ignored, without raising an error. In such case, we can add an error message for that condition too.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Warning on wrong VAT’ is closed to new replies.