• Resolved BenLinders

    (@benlinders)


    I’m using the plugin to prevent selling digital products in the EU to non business customers. Plugin has been configured to require VAT nr for EU customers.

    But what if there is no VAT? Some of my products are free, others are exempted from VAT. The plugin still requires a VAT number for EU customers although there is no VAT withhold.

    Is there a way to solve this?

    Site https://www.benlinders.com

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

    (@daigo75)

    The behaviour you describe is by design. The “VAT required” option means “always required”, not “required only if there would be VAT to pay”. The purpose of that option is to enforce B2B transactions. That is, customers are not allowed to complete an order without providing a valid VAT number, which is used to identify them as businesses, whether there would be VAT to pay or not.

    There isn’t a check on the cart content to determine if the cart total is greater than zero, nor to determine if no tax is applicable, because that’s not what the “VAT required” option is for.

    If the VAT number is “not always required”, then you can do it as follows:
    – Set the VAT number field as optional. This will prevent the JavaScript on the checkout page from requiring it.
    – Implement your own custom logic to determine if the field should be required, by writing a filter for the wc_aelia_euva_order_is_eu_vat_number_required hook.

    In your filter, you can do what you like to decide if the VAT number should be required, and return true or false, as needed. The field will remain optional on the frontend, then your custom logic will kick in when the customer tries to complete the checkout, eventually telling him that the VAT number is required.

    If you need help implementing the customisation, you can use our contact form to get in touch. We will review your specifications and get back to you with an estimate for the implementation.

    Thread Starter BenLinders

    (@benlinders)

    Thanks Diego for your suggestion!

    I added a hook which returns false when there’s no VAT to pay and have set VAT to required for EU address. Works great!

    Only problem left now is that I sell both paperbacks and ebooks. I want to prevent ebook selling due to VAT MOSS, but want to allow to sell paperbacks as I can pay the VAT for such transactions in my base country.

    Any way that I can do that? Is there an easy way to check the cart and find out if there’s a electronic product with VAT in there?

    Ben Linders

    Plugin Author Diego

    (@daigo75)

    Blocking an EU sale if the cart contains digital products is outside the scope of the EU VAT Assistant (and it might also be considered discriminatory, there are different opinions about this).

    If you want to do that, I reckon that you would have two options:

    1. Use our Prices by Country plugin to make some products unavailable to the EU. Create a region for Europe, add all the EU countries (except your own), then go to the specific products and make them unavailable to that region (screenshots: https://prntscr.com/e0sm5a and https://prntscr.com/e0slq2).
    2. Look at the following article: https://www.remicorson.com/woocommerce-hide-checkout-fields-for-virtual-products/. The function woo_cart_has_virtual_product() in the article will tell you if the cart contains virtual products. Once you have that information, you can use it to prevent the checkout, filter the list of available countries, or make products unavailable, like the Prices by Country plugin does.
    • This reply was modified 7 years, 10 months ago by Diego.
    Thread Starter BenLinders

    (@benlinders)

    Thanks Diego for your help, much appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘VAT nr should not be required when there is no VAT withhold’ is closed to new replies.