View Categories

Enable the VAT Field in Block-Based Checkout

To show the VAT field in the WooCommerce Checkout block, turn on Checkout block field in EU/UK VAT Manager for WooCommerce at WPFactory > EU VAT (also reachable at WooCommerce > Settings > EU VAT) > Advanced. The option is free and needs WooCommerce 8.9.1 or later.

If your store uses the WooCommerce Checkout block instead of the classic shortcode checkout, the VAT field needs to be registered for blocks. EU/UK VAT Manager does this for you once the option below is on.

Turn it on #

  1. Go to WPFactory > EU VAT (also reachable at WooCommerce > Settings > EU VAT), Advanced sub-tab.
  2. Enable Checkout block field (alg_wc_eu_vat_enable_checkout_block_field).
  3. Save changes and open your block checkout to confirm the VAT field appears.

If you see a JavaScript error #

If the browser console shows Uncaught ReferenceError: alg_wc_eu_vat_ajax_object is not defined, enable Add script dependency (alg_wc_eu_vat_checkout_block_field_dependencies) on the same sub-tab. It forces the validation script to load with the right dependencies in the block checkout.

Options reference #

Label Option ID Default Free/Pro
Checkout block field alg_wc_eu_vat_enable_checkout_block_field No Free
Add script dependency alg_wc_eu_vat_checkout_block_field_dependencies No Free

Move the VAT field to another spot #

In the block checkout, EU/UK VAT Manager registers the VAT field in the Contact information section. The Priority (i.e., position) option on the General sub-tab only positions the field in the billing section of the classic checkout, so it has no effect here.

To place the field somewhere else, a developer can use the alg_wc_eu_vat_field_position_block_checkout filter. Return a CSS selector for an element on your checkout page. After the page loads, the plugin finds that element and moves the VAT field, together with the Let customer decide and Valid VAT but still paying? checkboxes if you use them, to just after the closest div that wraps it.

add_filter( 'alg_wc_eu_vat_field_position_block_checkout', function () {
	return '.your-target-selector'; // CSS selector of the element to place the field after
} );
  • Find the selector with your browser’s element inspector on the checkout page.
  • Pick an element that is always on the page. If the selector matches nothing, the field stays in Contact information.
  • Some checkout sections change their markup when they open or close, for example an address summary that turns into an edit form. Test both states after you add the filter.

Add the snippet with a code snippets plugin or your child theme’s functions.php, then clear caches and reload the checkout.

Still not showing? #

Clear any caching or minification, then test with a default theme. For a full checklist, see VAT field not showing in block-based checkout.

Advanced sub-tab showing Checkout block field and Add script dependency

Get more control #

Block checkout support is free. Explore the full feature set of EU/UK VAT Manager for WooCommerce. See what Pro unlocks.

Need a hand? Our team answers every ticket on the EU/UK VAT Manager support forum.