Jonathan Gustafsson
Awaiting Review

Bug: When VIES returns a placeholder address for a valid VAT number (e.g. the Finnish 00000 OSOITE TUNTEMATON when no address is published), revalidateVat() copies it straight onto the billing address. The order then has an empty/invalid postcode+city and Ingrid rejects it (On Hold). Seen on order #13467 (FI, returning customer).

Detection is country-agnostic: we don't enumerate per-country placeholder strings - we check whether the resulting postcode/city is usable (empty or all-zero postcode, or empty city = unusable).

Gate: only valid VAT numbers reach the propagation path; invalid VAT already propagates nothing.

Two use cases (valid VAT + unusable VIES address):

  • A. Logged-in / registered customer: fall back to the customer's registered billing_default address (their real address on file); keep company name + VAT.
  • B. Anonymous checkout: fall back to the delivery address entered at checkout; keep company name + VAT; let the order proceed.

Fix: PR #593 - VatNumber::hasUsableAddress() + revalidateVat() uses the VIES address when usable, otherwise the customer's real address per the two cases above. Unit tests for the detection.

VIES placeholder address propagates to order and breaks delivery (FI '00000 OSOITE TUNTEMATON')

no votes yet
Priority P2

Assigned to

Yaroslav Yaroslav

Tags

Storefront
Quick Actions
Activity
View recent activity and updates
Use arrow keys to navigate