Created
March 13, 2019 17:22
-
-
Save jesseeproductions/8d5ba3d871007361b7c2f3563ddfc17b to your computer and use it in GitHub Desktop.
Prevent Sales Tax For Tickets under a certain Event or Post ID
This file contains hidden or 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
/** | |
* 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