VAT required based on country
-
I run the woocommerce plugin EU VAT Assistant it works nicely, but I’m interested to change the VAT field to required based on country, I put this code in functions.php but not works.
add_filter(‘woocommerce_billing_fields’, ‘woocommece_vat_checkout_required’, 10, 2);
function woocommece_VAT_checkout_required($fields, $country) {
if($country==’ES’) {
if (isset($fields[‘vat_number’]))
{
$fields[‘vat_number’][‘required’]=true;
}
}
return $fields; }Any help is appreciated
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘VAT required based on country’ is closed to new replies.