Forums › WooCommerce EU & UK VAT Numbers Validation – Support Forum › Field position doesn’t show correct in address
- Support forum for the WooCommerce EU & UK VAT Numbers Validation.
- This topic has 2 replies, 3 voices, and was last updated 5 months, 1 week ago by
Birendra.
-
AuthorPosts
-
June 5, 2026 at 2:11 pm #186007
Dennis van Rossum
ParticipantSubject: Block checkout – VAT field overlaps address fields after using the alg_wc_eu_vat_field_position_block_checkout filter
Hi,
I’m using EU VAT for WooCommerce on the block-based (React) checkout and I’ve hit a positioning bug with the new alg_wc_eu_vat_field_position_block_checkout filter.
What I’m trying to do:
Move the VAT field out of the Contact section and into the shipping/billing address section. I added this filter:add_filter( ‘alg_wc_eu_vat_field_position_block_checkout’, function ( $position ) {
return ‘address’;
} );What works:
While the address block is in its collapsed/summary state, the VAT field correctly appears directly below the address summary card.The bug:
As soon as the customer clicks “Edit” on the shipping address, the address form remounts and the VAT field is positioned incorrectly — it overlaps the First name / Last name row instead of sitting with the other address fields. After that the field is effectively unusable.Root cause I can see in the DOM:
The filter does not re-register the field to the WooCommerceaddresslocation. The input keeps its original contact idcontact-alg_eu_vat-billing_eu_vat_numberand receives the attributedata-alg-vat-moved="yes". So the field remains a contact-location field and is moved intowc-block-components-address-card-wrappervia JavaScript. When React re-renders the address form on the edit toggle, the moved node ends up overlapping thewc-block-components-address-formfields (it lands on top of the name row).Steps to reproduce:
1. Block-based checkout active.
2. VAT field set to show (company filled + EU country outside the base country).
3. Add the filter above, returning ‘address’.
4. Fill the shipping address so it collapses to the summary card — the VAT field shows correctly below it.
5. Click “Edit” on the shipping address.
6. The VAT field now overlaps the First/Last name fields.Expected behavior:
The VAT field should render as a proper field inside the address form in both the summary and edit states, without overlapping core fields — ideally by registering it as an actualaddress-location additional checkout field via woocommerce_register_additional_checkout_field(), rather than moving the existing contact node with JS.Thanks for looking into this!
June 8, 2026 at 12:20 pm #186132Hindi
ParticipantHi Dennis,
Thank you for your detailed report and for providing the reproduction steps and technical analysis.
We have received your request and will review it with our development team to investigate the issue further. We’ll get back to you with any updates as soon as we have more information.
Thank you for your patience.
June 10, 2026 at 7:39 pm #186244Birendra
ModeratorHi Dennis,
In WooCommerce Block checkout, there is a limitation in how custom fields are handled. If we register the VAT field directly in the address section, it will appear in both shipping and billing sections. Because of this, we register the VAT field in the Contact section and then move it using JavaScript.
From what I understand, you want to place the VAT field after the Shipping Address block. You can adjust its position using a CSS selector like this:
add_filter( ‘alg_wc_eu_vat_field_position_block_checkout’, function () {
return ‘.wc-block-components-address-address-wrapper’;
} );Or place it after a specific field, for example Shipping Company:
add_filter( ‘alg_wc_eu_vat_field_position_block_checkout’, function () {
return ‘#shipping-company’;
} );The filter accepts a CSS selector, so you can pass any valid ID (#element-id) or class (.element-class) where you would like the EU VAT field to be inserted.
Screenshot showing VAT field after Shipping Company: https://prnt.sc/JA5IbSInaSTD
Could you please try this and let us know if this works for you? If you have any questions or need further help, just let us know.
Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.