The issue described could be linked to the theme. The EU VAT Assistant already performs an update of the checkout data when the VAT number changes. The update is triggered by the plugin when one of the following fields change:
– Billing country
– Shipping country
– Company name
– “Ship to different address” checkbox
– VAT number
When one of those fields changes, or when the user moves from the VAT number to another field (blur
event on the VAT number field), a “change” event is triggered on the checkout form. Normally, such event refreshes the checkout data automatically (tested on themes like TwentyTwenty and Storefront, works as it should).
If that doesn’t work on your site, I would speculate that the checkout page on your site uses a different structure, or logic, than the one expected by the plugin, and that causes the events not to be triggered. Another possibility is that some other script is causing a conflict (unlikely, but not impossible).
How to investigate the issue
The logic that triggers the update of the checkout data is file woocommerce-eu-vat-assistant/src/js/frontend/frontend.js
, in function set_eu_vat_field_handlers()
. You can use the browser tools to add some breakpoints in that function and see if the events are triggered.
In the function you will also find the field IDs and selectors used by the EU VAT Assistant to intercepts the changes in fields listed above. You can compare them with the field IDs used on your checkout page and see if, perhaps, the page structure is different and the elements expected by the script are missing.
If you purchased a support plan for the EU VAT Assistant, we can also investigate the issue for you, directly on the affected site. In such case, you can contact us via our contact form, at https://aelia.co/contact, and we will send you further instructions.