wp-pay-core icon indicating copy to clipboard operation
wp-pay-core copied to clipboard

Remove VAT number validation from core

Open remcotolsma opened this issue 8 months ago • 0 comments

We had a customer where initiating a payment sometimes took up to 2 minutes. It was difficult to find out what caused this, but it turned out to be the VIES service. In this case, empty VAT numbers were also validated in combination with Gravity Forms. Validating an empty VAT number does not make sense, but the entire validation is not yet used. That is why I think it would be better to completely remove the entire VAT number validation from core. There are also special EU VAT number validation plugins available for WooCommerce and possibly other plugins. If we want to keep VAT number validation, it might be better to do this via the WordPress HTTP requests API instead of the SoapClient PHP library. It was now very difficult to determine the cause of the 2 minute delay.

https://github.com/pronamic/wp-pay-core/blob/5d9bed040df3dcae9eea819ace6acb4ce2b31ee7/src/CustomerHelper.php#L63-L79

CC @rvdsteege

Internal HelpScout ticket: https://secure.helpscout.net/conversation/2615779403/27300?viewId=1425715#thread-7916353505

remcotolsma avatar Jun 20 '24 13:06 remcotolsma