I want to remove vat from checkout on run-time, If vat number field has some value.

I am able to validate vat number on run-time on checkout (via this link Programmatically check VAT number is valid in checkout page magento 2.3.X? ) but didn't know how to remove vat from order total and shipping. Also I know Magento provides vat validation and removal from configuration but that only works for logged in customers.

Screenshot: https://nimb.ws/8ZEyVB

  • Please attachment screenshot Commented Feb 20, 2020 at 3:46
  • @MohitPatel Question updated. please check Commented Feb 20, 2020 at 6:09

1 Answer 1


Working now. Used Magento's default vat options to verify and remove vat. https://docs.magento.com/m2/ee/user_guide/tax/vat-validation-configure.html

  • Do this work on run-time on checkout for guest checkout.?
    – Anees
    Commented Feb 26, 2022 at 5:52
  • 1
    Yes, I remember it was working :) Commented Feb 27, 2022 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.