Forked from JarrydLong/mypmpro-remove-uk-from-eu.php
Last active
January 6, 2025 12:15
-
-
Save kimwhite/a3e5e5ce98ce8a09df767527ca011633 to your computer and use it in GitHub Desktop.
This file contains 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 Non-EU Resident from list 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_from_eu( $countries ){ | |
unset( $countries['NOTEU'] ); | |
return $countries; | |
} | |
add_filter( 'pmpro_vat_by_country', 'mypmpro_remove_from_eu', 10, 1 ); | |
add_filter( 'pmpro_european_union', 'mypmpro_remove_from_eu', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment