Created
November 28, 2024 07:18
-
-
Save andrewlimaza/27384f6fd00ef7171cf149622881692c to your computer and use it in GitHub Desktop.
Flat rate 15% VAT/TAX added to all PMPro orders and checkouts
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 | |
/** | |
* Add 15% tax to all PMPro checkouts. | |
* Add this code to your site by visiting this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function customtax_pmpro_tax( $tax, $values, $order ) { | |
$tax = round((float)$values['price'] * 0.15, 2); | |
return $tax; | |
} | |
add_filter("pmpro_tax", "customtax_pmpro_tax", 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment