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
| <?php | |
| /* | |
| * Event Tickets Plus v4.6+: Assign all WooCommerce Tickets to a specific | |
| * Product Category upon saving (create or update, won't affect old tickets). | |
| * | |
| * !!! YOU NEED TO CHANGE THE CODE TO BE THE PRODUCT CATEGORY ID(S) YOU WANT !!! | |
| * | |
| * @link https://gist.github.com/cliffordp/5bffd372db4ebf14482574ce9bb2479c This snippet. | |
| * @link https://gist.github.com/cliffordp/63abddea69b60f616c1aec1c6bdfc299 Another snippet you might be interested in. |
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
| <?php | |
| /* | |
| * Event Tickets Plus v4.6+ - WooCommerce Tickets: Keep all but the lowest-priced | |
| * WooTicket for each event as Hidden visibility. Change the least-expensive to | |
| * Visible (Shop and search results). | |
| * | |
| * This snippet only works with WooCommerce 3.0.0+. | |
| * We could do the same logic on a different action, like when a ticket is | |
| * deleted or an attendee is created / ticket is sold, but this probably isn't |
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
| <?php | |
| /* | |
| * Causes WooCommerce Ticket product pages to stop redirecting to their event page | |
| * See https://theeventscalendar.com/knowledgebase/selling-tickets-from-the-woocommerce-products-page/ | |
| */ | |
| function tribe_wootix_no_hijack() { | |
| if ( ! class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) return; | |
| $woo_tickets = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); | |
| remove_filter( 'post_type_link', array( $woo_tickets, 'hijack_ticket_link' ), 10, 4 ); |
NewerOlder