Last active
May 15, 2025 05:57
-
-
Save JarrydLong/8f78c4290b4c2d6d0fd77f5de1f9e9bd 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 apply the reduced tax rates as set out in the European Union (2025). | |
* Uses the higher reduced rate if multiple are listed. | |
* | |
* 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. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function mypmpro_reduced_eu_tax_rates( $pmpro_vat_by_country ) { | |
// Using ISO Country Codes | |
$pmpro_vat_by_country = array( | |
"AT" => 0.13, // Austria | |
"BE" => 0.12, // Belgium | |
"BG" => 0.09, // Bulgaria | |
"HR" => 0.13, // Croatia | |
"CY" => 0.09, // Cyprus | |
"CZ" => 0.12, // Czech Republic | |
"DK" => 0.25, // Denmark | |
"EE" => 0.13, // Estonia | |
"FI" => 0.14, // Finland | |
"FR" => 0.10, // France | |
"GE" => 0.18, // Georgia | |
"DE" => 0.07, // Germany | |
"GR" => 0.13, // Greece | |
"HU" => 0.18, // Hungary | |
"IS" => 0.11, // Iceland | |
"IE" => 0.135, // Ireland | |
"IT" => 0.10, // Italy | |
"LV" => 0.12, // Latvia | |
"LT" => 0.09, // Lithuania | |
"LU" => 0.08, // Luxembourg | |
"MT" => 0.07, // Malta | |
"MD" => 0.12, // Moldova | |
"NL" => 0.09, // Netherlands | |
"NO" => 0.15, // Norway | |
"PL" => 0.08, // Poland | |
"PT" => 0.13, // Portugal | |
"RO" => 0.09, // Romania | |
"SK" => 0.19, // Slovakia | |
"SI" => 0.095, // Slovenia | |
"ES" => 0.10, // Spain | |
"SE" => 0.12, // Sweden | |
"CH" => 0.038, // Switzerland | |
"TR" => 0.10, // Turkey | |
"UA" => 0.14, // Ukraine | |
"GB" => 0.05, // United Kingdom | |
"CA" => array("BC" => 0.05) // No change for Canada | |
); | |
return $pmpro_vat_by_country; | |
} | |
add_filter( 'pmpro_vat_by_country', 'mypmpro_reduced_eu_tax_rates', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment