Skip to content

Instantly share code, notes, and snippets.

@woogist
Created September 29, 2021 12:01
Show Gist options
  • Save woogist/4361b3db54b7a21fa6571ba98cf63b3b to your computer and use it in GitHub Desktop.
Save woogist/4361b3db54b7a21fa6571ba98cf63b3b to your computer and use it in GitHub Desktop.
filter to remove select countries where the VAT number field will show for
add_filter( 'woocommerce_eu_vat_number_country_codes', 'woo_custom_eu_vat_number_country_codes' );
function woo_custom_eu_vat_number_country_codes( $vat_countries ) {
$display_vat = array_diff($vat_countries, ['SE', 'GB']); // remove countries in second array
return array_values($display_vat); // reindex array
}
@woogist
Copy link
Author

woogist commented Sep 29, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment