Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. <?php
  2. /*
  3. Custom Tax Example.
  4. - Requires PMPro 1.3.13 or higher.
  5. - Leave the tax fields blank in the payment settings.
  6. - We update the price description to include the tax amount.
  7. */
  8. function my_pmpro_tax($tax, $values, $order)
  9. {
  10. $tax = round((float)$values[price] * 0.055, 2);
  11. return $tax;
  12. }
  13. add_filter("pmpro_tax", "my_pmpro_tax", 10, 3);
  14.  
  15. function my_pmpro_level_cost_text($cost, $level)
  16. {
  17. $cost .= " Customers will be charged 5.5% tax.";
  18. return $cost;
  19. }
  20. add_filter("pmpro_level_cost_text", "my_pmpro_level_cost_text", 10, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement