Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove VAT number validation from core #193

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions src/CustomerHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

use Pronamic\WordPress\DateTime\DateTime;
use Pronamic\WordPress\Pay\Core\Util as Core_Util;
use Pronamic\WordPress\Pay\VatNumbers\VatNumberViesValidator;

/**
* Customer helper
Expand Down Expand Up @@ -60,24 +59,6 @@ public static function complement_customer( Customer $customer ) {
ContactNameHelper::complement_name( $name );
}

// VAT Number validity.
$vat_number = $customer->get_vat_number();

if ( null !== $vat_number ) {
$vat_number_validity = $vat_number->get_validity();

if ( null === $vat_number_validity ) {
try {
$vat_number_validity = VatNumberViesValidator::validate( $vat_number );
} catch ( \Exception $e ) {
// On exceptions we have no VAT number validity info, no problem.
$vat_number_validity = null;
}

$vat_number->set_validity( $vat_number_validity );
}
}

// Locale.
if ( null === $customer->get_locale() ) {
$locales = [];
Expand Down
60 changes: 0 additions & 60 deletions src/VatNumbers/VatNumberViesValidator.php

This file was deleted.

Loading