strangerstudios / pmpro-vat-tax

Calculate VAT tax at membership checkout with Paid Memberships Pro. Allows customers with a VAT Number to avoid the tax.
https://www.paidmembershipspro.com/add-ons/vat-tax/
8 stars 20 forks source link

Detect if the VAT Number Entered Contains the Country ISO Code #59

Closed JarrydLong closed 9 months ago

JarrydLong commented 9 months ago

There's cases where a member will enter a full VAT number including country code which results in the validation failing as we prepend the country code to the VAT number before validation.

We should rather check if the country code is present, then use it as is, otherwise prepend it to the VAT number where necessary based on the country selected.

andrewlimaza commented 9 months ago

Related: https://github.com/strangerstudios/pmpro-vat-tax/issues/33