@yesaul, I chose to make a slightly different change so that the corrected validation would apply to both the admin and the storefront, changing /includes/classes/VatValidation.php:
Code:// ----- // The class constructor gathers the to-be-verified country-code (2-character ISO) and // the associated VAT Number. The "VAT Number" value must include any country code // prefix. // // Since we'll need the SOAP service to automatically validate the VAT Number, check now // to see that the PHP installation includes that service, logging a warning if not. // public function __construct($countryCode, $vatNumber) { if (defined('VAT4EU_ENABLED') && VAT4EU_ENABLED == 'true') { $this->debug = (defined('VAT4EU_DEBUG') && VAT4EU_DEBUG == 'true'); // ----- // Greek VAT numbers start with 'EL' instead of their country-code ('GR'). // $this->countryCode = ($countryCode == 'GR') ? 'EL' : $countryCode; $this->vatNumber = strtoupper($vatNumber); if (!class_exists('SoapClient')) { trigger_error('VAT Number validation not possible, "SoapClient" class is not available.', E_USER_WARNING);; } else { $this->soapInstalled = true; try { $this->_client = new SoapClient(self::WSDL, array('trace' => true) ); } catch(Exception $e) { $this->soapInstalled = false; trigger_error("VAT Number validation not possible, VAT Translation Error: " . $e->getMessage(), E_USER_WARNING); } } $this->trace("__construct($countryCode, $vatNumber)"); } }


Reply With Quote

