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
<?php | |
/** | |
* List View Single Event | |
* This file contains one event in the list view | |
* | |
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/list/single-event.php | |
* | |
* @version 4.6.3 | |
* | |
*/ |
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
<?php | |
/** | |
* Renders the WooCommerce tickets table/form | |
* | |
* Override this template in your own theme by creating a file at: | |
* | |
* [your-theme]/tribe-events/wootickets/tickets.php | |
* | |
* @version 4.6.2 | |
* |
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
<?php | |
/** | |
* Tickets Email Template | |
* The template for the email with the purchased tickets when using ticketing plugins (Like WooTickets) | |
* | |
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/tickets/email.php | |
* | |
* This file is being included in events/lib/tickets/Tickets.php | |
* in the function generate_tickets_email_content. That function has a $tickets | |
* array with elements that have this fields: |
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
<?php | |
/* | |
* When running imports with Event Aggregator it assigns a category depending on event title. | |
* Works upon inserting and updating events. | |
*/ | |
add_filter ( 'tribe_aggregator_before_insert_event', 'tribe_aggregator_custom_event_categories' ); | |
add_filter ( 'tribe_aggregator_before_update_event', 'tribe_aggregator_custom_event_categories' ); | |
function tribe_aggregator_custom_event_categories ( $event ) { | |
$event_title = $event['post_title']; |
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' ); | |
} |
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
<?php | |
global $post; | |
$post_id = Tribe__Events__Main::postIdHelper(); | |
$is_auto_draft = get_post_status( $post_id ) === 'auto-draft'; | |
// If not $_POST and if this is not an auto-draft then get the current values to edit | |
if ( ! $_POST && ! $is_auto_draft ) { | |
$venue_name = tribe_get_venue(); |
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
<?php | |
/** | |
* Use today as the start of the week for the This Week widget. | |
* | |
* @param $instance | |
* @param $widget | |
* | |
* @return mixed | |
* @author Barry Hughes |
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
<?php | |
/** | |
* Adds different custom message to order emails depending on order items | |
* @author Victor Zarranz | |
*/ | |
add_action( 'woocommerce_email_order_details', 'add_custom_message', 10, 1 ); | |
function add_custom_message( $order ) { | |
$wootix = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); | |
$items = $order->get_items(); |
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
<?php | |
/** | |
* Defines alternative title for recurring event views. | |
* Based on: https://theeventscalendar.com/knowledgebase/changing-the-browser-title-for-calendar-views/ | |
* | |
* @param string $title | |
* @return string | |
*/ | |
function filter_events_title( $title ) { |
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
<?php | |
/** | |
* BCC event organizers email on all Event Tickets' RSVP and commerce ticket emails so they get a copy of it too | |
*/ | |
function bcc_all_event_organizers( $headers, $event_id, $order_id ) { | |
//check if has organizer | |
if ( !tribe_has_organizer( $event_id ) ) { | |
return $headers; | |
} |