Created
March 2, 2016 13:51
-
-
Save jesseeproductions/787c47f1756a18d8c05d to your computer and use it in GitHub Desktop.
Event Tickets Plus - Disable Taxes for Ticket Products
This file contains 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
/** | |
* Event Tickets Plus - Disable Taxes for Ticket Products | |
*/ | |
add_action( 'wootickets_after_save_ticket', 'tribe_disable_taxes_ticket_product' ); | |
function tribe_disable_taxes_ticket_product( $ticket_id ) { | |
update_post_meta( $ticket_id, '_tax_status', 'none' ); | |
update_post_meta( $ticket_id, '_tax_class', 'zero-rate' ); | |
} |
Does this one still work? Or is there a new/different option for changing the tax rate for tickets in WooCommerce?
I used the event_tickets_after_save_ticket one today from the 12/5/17 post and it fixed the issue for me.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Brian!
wootickets_after_save_ticket action was removed in Event Tickets Plus 4.6.
I manged to accomplish the same using the event_tickets_after_save_ticket action
add_action( 'event_tickets_after_save_ticket', 'tribe_disable_taxes_ticket_product', 10, 2 ); function tribe_disable_taxes_ticket_product( $post_id, $ticket ) { update_post_meta( $ticket->ID, '_tax_status', 'none' ); update_post_meta( $ticket->ID, '_tax_class', 'zero-rate' ); }