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 | |
/** | |
* 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
<?php | |
// If you use this snippet as-is, ALL of The Events Calendar (i.e. "Core") and Pro add-on styles will NOT be loaded. | |
// (although there may be some $handles that I didn't detect... especially from widgets, shortcodes, and the like... no guarantess ;-) | |
// Comment out the line of each style you DO want to load. | |
// Note the comments within each array regarding the Display style options -- https://theeventscalendar.com/knowledgebase/wp-admin-settings-overview/#display | |
// The Display styles are "stacked". | |
// In other words, the Skeleton files are always loaded, and the Full styles are loaded when Tribe Events Styles (i.e. Theme) is selected. | |
// However, the commented .css example file names can change, e.g. 'full.min.css' instead of 'skeleton.min.css' or 'theme-mobile.min.css' instead of 'full-mobile.min.css' | |
// |
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 | |
/** | |
* Prevent calendar export links from showing anywhere on the front-end. | |
* | |
* | |
*/ | |
class Tribe__Events__Remove__Export__Links { | |
public function __construct() { | |
add_action( 'init', array( $this, '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 | |
/** | |
* Event Tickets Plus - Add other WooCommerce Product to Cart when WooCommerce Ticket is added to cart | |
* | |
* @link https://wordpress.org/plugins/woocommerce-product-dependencies/ May be a better and easier solution !!! !!! !!! (But I haven't tried it.) | |
* | |
* !!! Before using, edit the variables in this function according to your needs!!! | |
* Could maybe also do the inverse (if ticket product is removed from cart, also remove the chained product). | |
* | |
* From https://gist.github.com/cliffordp/30481ca323012e298418095476d49337 |
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 | |
/** | |
* Plugin name: Event Tickets Meta Hawk | |
* Description: Lets site administrators soar over attendee meta data supplied by attendees then swoop down, hawk-like, to change it. Proof of concept targeting the WooCommerce provider. | |
* Version: 2016-03-21 | |
* Author: Barry Hughes | |
* | |
* Experiment in making attendee meta editable via the attendee screen. | |
* Well worth bearing in mind that: | |
* |
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 site admin email on all Event Tickets' RSVP ticket emails so they get a copy of it too | |
* | |
* From https://gist.github.com/cliffordp/4f06f95dbff364242cf54a3b5271b182 | |
* | |
* Reference: https://developer.wordpress.org/reference/functions/wp_mail/#using-headers-to-set-from-cc-and-bcc-parameters | |
* | |
*/ | |
function cliff_et_rsvp_bcc_admin_ticket() { |
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 | |
/* | |
* 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 ); |
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 QR codes from the Email/Tickets sent to purchasers | |
*/ | |
function tribe_neuter_qr () { | |
if ( class_exists( 'Tribe__Tickets_Plus__Main' ) ) { | |
$qr_class = Tribe__Tickets_Plus__Main::instance()->qr(); | |
remove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( $qr_class, 'inject_qr' ) ); | |
} |
NewerOlder