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 0 replies, 1 voice, and was last updated 5 months, 2 weeks ago by
Dennis van Rossum.
-
AuthorPosts
-
June 5, 2026 at 2:10 pm #186006
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.Environment:
– EU VAT for WooCommerce: 4.6.6
– WooCommerce: 10.8.1
– WordPress: 7.0
– Theme: Shoptimizer 2.9.5
– PHP: 8.1.34
– Caching/optimization plugins: WPRocket 3.21.3I can see in edit mode the field is overlapping the name row.
Thanks for looking into this!
-
AuthorPosts
- You must be logged in to reply to this topic.