Created
January 21, 2021 11:30
-
-
Save JarrydLong/7a2b0733a88f9d74057fde2388aac3d5 to your computer and use it in GitHub Desktop.
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
<?php | |
/** | |
* 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. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: https://www.paidmembershipspro.com/uk-leaves-eu-vat-add-on-pmpro-update/