Title: Trigger VAT ID check programatically
Last modified: August 7, 2024

---

# Trigger VAT ID check programatically

 *  [marianssen](https://wordpress.org/support/users/marianssen/)
 * (@marianssen)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/trigger-vat-id-check-programatically/)
 * Hi there,
 * I’d like to have the option to hide/show this field based on a ‘Business purchase?’
   custom checkout field. I’m trying to achieve this functionality but I’m currently
   stuck on one thing – the VAT should be re-added if the customer unchecks this‘
   Business purchase?’ custom field.
 * On the checkbox change, I’m removing value from #billing_eu_vat_number. However,
   this does not retrigger VAT calculation. I’ve tried triggering change event on#
   billing_eu_vat_number, also tried triggering to recalculate the whole cart, but
   none worked. How can I manually trigger the VAT recaculation?
 * Regards

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

 *  [Moshtafizur](https://wordpress.org/support/users/moshtafizur01/)
 * (@moshtafizur01)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/trigger-vat-id-check-programatically/#post-17947465)
 * Hi [@marianssen](https://wordpress.org/support/users/marianssen/),
 * Thanks for reaching out.
 * I have escalated this with our development team. They will get back to you as
   soon as possible.
 * Kind regards.
 *  Plugin Contributor [Kousik Mukherjee](https://wordpress.org/support/users/kousikmukherjeeli/)
 * (@kousikmukherjeeli)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/trigger-vat-id-check-programatically/#post-17949317)
 * Hello [@marianssen](https://wordpress.org/support/users/marianssen/),
 * You can call the JavaScript function `alg_wc_eu_vat_validate_vat();` to validate
   the VAT number programmatically.
 * Regards,
   Kousik Mukherjee

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

The topic ‘Trigger VAT ID check programatically’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/eu-vat-for-woocommerce_d1d0f0.svg)
 * [EU/UK VAT Validation Manager for WooCommerce](https://wordpress.org/plugins/eu-vat-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/eu-vat-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/eu-vat-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/eu-vat-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/eu-vat-for-woocommerce/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * 2 replies
 * 3 participants
 * Last reply from: [Kousik Mukherjee](https://wordpress.org/support/users/kousikmukherjeeli/)
 * Last activity: [1 year, 9 months ago](https://wordpress.org/support/topic/trigger-vat-id-check-programatically/#post-17949317)
 * Status: not resolved