Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
VAT tax filter
<?php
/*
Plugin Name: PMPro VAT for Austria
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-customizations/
Description: PMPro: VAT for Austria
Version: .1
Author: Stranger Studios
Author URI: http://www.strangerstudios.com
*/
/*
Tax solution for Austria
Edit as needed, then save this file in your plugins folder and activate it through the plugins page in the WP dashboard.
*/
//add tax info to cost text. this is enabled if the danish checkbox is checked.
function customtax_pmpro_tax($tax, $values, $order)
{
$rate_in_percent = 20; // Set to the required VAT/Tax rate
$tax_rate = (float)($rate_in_percent/100);
$tax = round((float)$values['price'] * $tax_rate, 2);
return $tax;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.