Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* This recipe will remove the UK from the list of EU countries to validate VAT numbers.
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
function mypmpro_remove_uk_from_eu( $countries ){
unset( $countries['GB'] );
return $countries;
add_filter( 'pmpro_vat_by_country', 'mypmpro_remove_uk_from_eu', 10, 1 );
add_filter( 'pmpro_european_union', 'mypmpro_remove_uk_from_eu', 10, 1 );

This comment has been minimized.

Copy link

@laurenhagan0306 laurenhagan0306 commented Mar 26, 2021

This recipe is included in the blog post on "UK Leaves the EU: What Changes in the VAT Add On" at Paid Memberships Pro here:

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