Created
September 29, 2021 12:01
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you to @robman87 for the original - https://gist.github.com/rynaldos-zz/edeb6c82904267d19538f1e49ce26894#gistcomment-3590910