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
/** | |
* Tribe, adding user meta to the attendees csv export | |
* Source: https://theeventscalendar.com/support/forums/topic/adding-woocommerce-order-notes-to-attendees-export/ | |
* | |
* Last updates: Feb 13, 2019 | |
**/ | |
function tribe_export_custom_set_up( $event_id ) { | |
//Add Handler for Community Tickets to Prevent Notices in Exports | |
if ( ! is_admin() ) { |
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; | |
} |
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
add_action( 'pre_get_posts', 'tribe_exclude_events_category' ); | |
function tribe_exclude_events_category( $query ) { | |
if ( ! is_singular( 'tribe_events' ) ) { | |
if ( $query->query_vars['post_type'] == Tribe__Events__Main::POSTTYPE && ! is_tax( Tribe__Events__Main::TAXONOMY ) && empty( $query->query_vars['suppress_filters'] ) ) { | |
$query->set( 'tax_query', array( | |
array( |
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
function tribe_mobile_default_view(){ | |
?> | |
<script> | |
if(typeof tribe_ev !== "undefined"){ | |
tribe_ev.fn.maybe_default_view_change = function(){ | |
if (tribe_ev.data.redirected_view || !tribe_ev.data.default_view || !tribe_ev.data.default_mobile_view || tribe_ev.data.default_view == tribe_ev.data.default_mobile_view || !tribe_ev.state.view || tribe_ev.data.default_mobile_view == tribe_ev.state.view) { | |
return false; | |
} | |
var $body = jQuery( 'body' ); | |
if ( ! $body.hasClass( 'tribe-mobile' ) ) { |
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
function tribe_mobile_default_view(){ | |
?> | |
<script> | |
if(typeof tribe_ev !== "undefined"){ | |
tribe_ev.fn.maybe_default_view_change = function(){ | |
if (tribe_ev.data.redirected_view || !tribe_ev.data.default_view || !tribe_ev.data.default_mobile_view || tribe_ev.data.default_view == tribe_ev.data.default_mobile_view || !tribe_ev.state.view || tribe_ev.data.default_mobile_view == tribe_ev.state.view) { | |
return false; | |
} | |
var $body = jQuery( 'body' ); | |
if ( ! $body.hasClass( 'tribe-mobile' ) ) { |
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.8.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 | |
// Function to add credits to cart (in main class) | |
public function listen_for_credit_purchases() { | |
// if ( ! wp_verify_nonce( '' ) ) { | |
// die( '-1' ); | |
// } | |
$product_quantities = $_POST['product_quantity']; |
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 | |
/** | |
* Single Event Meta (Additional Fields) Template | |
* | |
* Override this template in your own theme by creating a file at: | |
* [your-theme]/tribe-events/pro/modules/meta/additional-fields.php | |
* | |
* @package TribeEventsCalendarPro | |
*/ |
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.7.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
/* | |
* Prevents users from adding tickets to cart unless they have selected at least one ticket | |
*/ | |
function tribe_prevent_add_cart_empty() { | |
echo ' | |
<script type="text/javascript"> | |
jQuery( document ).ready(function(){ | |
jQuery( "form.cart" ).each(function(){ | |
var tribe_empty_form_message = "Please select at least one item before submitting"; | |
var tribe_cart_submit_button = jQuery( this ).find( "button[type=submit]" )[0]; |