Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Created March 13, 2019 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesseeproductions/8d5ba3d871007361b7c2f3563ddfc17b to your computer and use it in GitHub Desktop.
Save jesseeproductions/8d5ba3d871007361b7c2f3563ddfc17b to your computer and use it in GitHub Desktop.
Prevent Sales Tax For Tickets under a certain Event or Post ID
/**
* Prevent Sales Tax For Tickets under a certain Event or Post ID
*/
add_filter( 'tribe_tickets_commerce_paypal_add_to_cart_args', 'tribe_add_tax_rate_to_paypal_transaction', 10, 3 );
function tribe_add_tax_rate_to_paypal_transaction( $args, $php_post, $post ) {
// change 15713 to the event or post id with the tickets that should not collect sales tax
if ( $post->ID === 15713 ) {
$args['tax_rate'] = '00.00';
}
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment