The EU VAT Assistant doesn’t change user roles. It’s mostly a reporting plugin, and it’s designed not to “touch” data unless necessary.
If you would like to set the role after the completion of an order when the VAT number is valid, you can implement your own custom function upon checkout. Here’s a “rough” example, to get you started:
add_filter('wc_aelia_eu_vat_assistant_customer_vat_exemption', function($customer_vat_exemption, $vat_country, $vat_number, $vat_number_validated, $raw_vat_validation_response) {
global $vat_number_validated_result;
// Store the result of the VAT validation, which will be used later
$vat_number_validated_result = $vat_number_validated;
return $customer_vat_exemption;
}, 10, 5);
add_action('woocommerce_checkout_process', function() {
global $vat_number_validated_result;
if($vat_number_validated_result === 'valid') {
// VAT number is valid, do what you need to do
}
}, 99);
If you need assistance developing a complete customisation, we provide that service too. In such case, please feel free to get in touch and we will get back to you with an estimate. Thanks.