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 | |
/** | |
* MT - ET - ET+ - Change email From Address and From Name only when sending ticket emails -- works for RSVP, WooCommerce, and Easy Digital Downloads | |
* | |
* From https://gist.github.com/cliffordp/35d3c0a08e53b061920976f80f0f44b4 | |
* | |
* For https://theeventscalendar.com/support/forums/topic/change-the-sender-email-address-for-all-events-ticket-related-emails/ | |
*/ |
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
<p>This event is planned on:</p> | |
<p class="current-date"> | |
<?php | |
echo tribe_get_start_date(); | |
echo ' - '; | |
echo tribe_get_end_date(); | |
?> | |
</p> | |
<?php | |
global $post; |
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 | |
if ( ! function_exists( 'tribe_body_class_recurring_all' ) ) { | |
/** | |
* Adds a recurring all body class to the recurring all page | |
* | |
* @see body_class | |
*/ | |
function tribe_body_class_recurring_all( $classes, $class ) { |
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 | |
/* Tribe, limit ticket qty */ | |
function tribe_limit_tickets() { | |
?> | |
<script type="text/javascript"> | |
jQuery(document).ready( function( $ ) { | |
// do this if tickets available | |
if ( $('.tribe-events-tickets').length ) { | |
// set max qty to 1 |
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 | |
/** | |
* Hide the WooCommerce quantity adjustment fields on cart pages | |
*/ | |
function tribe_hide_woo_quantity_change() { | |
if ( ! is_cart() ) { | |
return; | |
} |
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 add_filter ( 'tribe_get_cost', 'tribe_not_show_free', 10, 3 ); | |
function tribe_not_show_free ( $cost, $post_id, $with_currency_symbol ) { | |
if ( $cost == 0 || $cost == 'Free' ) { | |
$cost = str_replace('Free', '', $cost); | |
$cost = str_replace(' - ', '', $cost); | |
} | |
return $cost; | |
} |
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 | |
/* The snippet shows the event title and event start date on the WooCommerce cart page | |
* Done with the help of @Rachel ;) | |
*/ | |
add_filter( 'woocommerce_cart_item_name', 'example_testing', 10, 3 ); | |
function example_testing( $title, $values, $cart_item_key ) { | |
$ticket_meta = get_post_meta( $values['product_id'] ); | |
$event_id = absint( $ticket_meta['_tribe_wooticket_for_event'][0] ); |
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 | |
/** | |
* Removes the iCal and Google cal links from the single event page | |
*/ | |
function tribe_remove_single_calendar_links() { | |
if ( function_exists( 'tribe' ) ) { | |
remove_action( 'tribe_events_single_event_after_the_content', array( tribe( 'tec.iCal' ), 'single_event_links' ) ); | |
} | |
} |
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 | |
/** | |
* Hides cost from the single event details section | |
* | |
* @param string $tpl Template relative path | |
*/ | |
function tribe_single_hide_cost( $tpl ) { | |
if ( 'modules/meta/details.php' === $tpl ) { | |
add_filter( 'tribe_get_formatted_cost', '__return_empty_string' ); |