Guest User

Untitled

a guest
Jan 17th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. add_filter( 'woocommerce_cart_tax_totals', 'show_zero_rate_taxes' );
  2.  
  3. function show_zero_rate_taxes( $tax_totals ) {
  4.  
  5. if ( empty( $tax_totals ) && WC()->customer->is_vat_exempt() ) {
  6. $tax_totals['zero-rated'] = (object) array(
  7. 'label' => 'Zero Rated Tax',
  8. 'amount' => 0,
  9. 'formatted_amount' => wc_price( 0 ),
  10. 'name' => 'Zero Rated Tax',
  11. 'is_compound' => false
  12. );
  13. }
  14.  
  15. return $tax_totals;
  16. }
Add Comment
Please, Sign In to add comment