At the moment, the EU VAT Assistant doesn’t include a “hard block” feature when there isn’t sufficient evidence to confirm customer’s location. In that scenario, the plugin simply asks the customer to self-certify their location. If the self-certification box is ticked, then the order can proceed.
If you wish to block an order altogether when the country from the IP address doesn’t match the billing or shipping country, you will have to write a customisation for that purpose. That kind of customisation is outside the scope of the support service we can provide on this forum, but the following template should help you getting started:
add_action('woocommerce_checkout_process', function() {
$billing_country = $_POST['billing_country'];
$shipping_country = $_POST['shipping_country'];
$geolocation_country = \Aelia\WC\IP2Location::factory()->get_visitor_country();
// Compare billing country and geolocation country. Raise an error if
// they don't match
if($billing_country !== $geolocation_country) {
wc_add_notice('Countries do not match', 'error');
}
});
Should you need assistance implementing your custom logic, please feel free to contact us (https://aelia.co/contact) and we will get back to you with an estimate as soon as possible. Thanks.