Created
June 26, 2020 10:38
-
-
Save JarrydLong/8f78c4290b4c2d6d0fd77f5de1f9e9bd 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 apply the reduced tax rates as set out in the European Union. | |
* Reduced rates were obtained from: | |
* https://taxfoundation.org/european-union-value-added-tax-2020/ | |
* | |
* | |
* 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_reduced_eu_tax_rates( $pmpro_vat_by_country ){ | |
//Using ISO Country Codes | |
$pmpro_vat_by_country = array( | |
"BE" => 0.12, | |
"BG" => 0.09, | |
"CZ" => 0.15, | |
"DK" => 0.25, | |
"DE" => 0.07, | |
"EE" => 0.09, | |
"GR" => 0.13, //EL | |
"ES" => 0.10, | |
"FR" => 0.10, | |
"HR" => 0.13, | |
"IE" => 0.135, | |
"IT" => 0.10, | |
"CY" => 0.09, | |
"LV" => 0.12, | |
"LT" => 0.09, | |
"LU" => 0.08, | |
"HU" => 0.18, | |
"MT" => 0.07, | |
"NL" => 0.09, | |
"AT" => 0.13, | |
"PL" => 0.08, | |
"PT" => 0.13, | |
"RO" => 0.09, | |
"SI" => 0.095, | |
"SK" => 0.10, | |
"FI" => 0.14, | |
"SE" => 0.12, | |
"GB" => 0.05, //UK | |
"CA" => array("BC" => 0.05) //No change | |
); | |
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