Home › Forums › Ticket Products › Event Tickets Plus › Sales Tax on Tickets
- This topic has 5 replies, 2 voices, and was last updated 8 years, 4 months ago by
Dylan.
-
AuthorPosts
-
November 23, 2017 at 9:48 am #1390165
Dylan
ParticipantHello. We do not charge sales tax on ticket sales and have been using a function to disable sales tax for all tickets. I acquired this function from one of the support staff here on the forum. Since the release of Event Tickets Pro 4.6, the function no longer works. This is what I’ve been using:
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’ );
}Any ideas on how to make this work with the new version? Better yet, could you include an option in the plugin to automatically disable sales tax on tickets? Our state does not require sales tax for events, and having a “disable sales tax” option would remove the extra step of editing the WooCommerce product for every event.
December 4, 2017 at 3:23 pm #1398199Victor
MemberHi Heather!
First, let me apologise for the delay in getting back to you. It seems this thread has gone out of radar somehow and we’ve just bumped into it.
I’m not really sure why that snippet could have stopped working. I will make some tests on my end with it and see if I can come up with a working snippet to accomplish the same with our latest version.
I will get back to you shortly, as soon as I have something. Please hang in there.
Thanks,
VictorDecember 5, 2017 at 1:19 pm #1398981Victor
MemberHi Heather!
Thanks for your patience while I worked on this.
First, please let me note that we are fairly limited in how much support we can give for custom development questions like that.
That said, we always like helping out and at least point users into the right direction as much possible.
It seems that snippet was using an action that was removed in our latest feature version of Event Tickets Plus 4.6 (learn more about it here > https://theeventscalendar.com/release-event-tickets-4-6-event-tickets-plus-4-6-events-calendar-4-6-4-community-tickets-4-5/)
I managed to come up with a slightly different snippet that accomplish the same thing using a different 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' );
}Please give it a try and see if it works.
Best,
VictorDecember 6, 2017 at 7:56 am #1399432Dylan
ParticipantThank you Victor, you’re awesome! The snippet works perfectly. I really appreciate your help with it.
December 6, 2017 at 7:31 pm #1399985Victor
MemberHi Heather!
Thank you for the kind words. I’m glad to know that worked out for you 🙂
I’ll go ahead and close this thread, but feel free to open a new topic if anything comes up and we’ll be happy to help.
Cheers!
Victor -
AuthorPosts
- The topic ‘Sales Tax on Tickets’ is closed to new replies.
