Skip to content

Instantly share code, notes, and snippets.

@ckpicker
ckpicker / gist:75fecbc6209538b1daf2
Created July 17, 2014 18:33
Events Calendar 3.6 // Remove End Time in the Schedule Details
add_filter( 'tribe_events_event_schedule_details_formatting', 'remove_end_time', 10, 2);
function remove_end_time( $formatting_details ) {
$formatting_details['show_end_time'] = 0;
return $formatting_details;
}
<?php
/**
* Returns the contents of the event cost field without applying any
* formatting tricks.
*
* Useful in those cases where a non-standard cost values such as
* "ABC-123" is used, else they may be "mangled" by the
* Tribe__Events__Cost_Utils object.
*
* @param string $cost (unused)
<?php
tribe_get_template_part( 'wootickets/tickets', null, array(
'tickets' => Tribe__Events__Tickets__Tickets::get_all_event_tickets( get_the_ID() )
) );
?>
@jesseeproductions
jesseeproductions / tribe-woo-catalog-visible.php
Last active July 16, 2019 13:13
WooCommerce Tickets - Set Catalog visibility to Catalog/search for all Tickets
/*
* The Events Calendar - WooCommerce Tickets - Set Catalog visibility to Catalog/search for all Tickets
* Alternative Hooks:
* wootickets_after_update_ticket
* wootickets_after_create_ticke
* @version 3.12
*/
add_action( 'wootickets_after_save_ticket', 'tribe_events_woo_change_visibility' );
function tribe_events_woo_change_visibility( $ticket_ID ) {
@cliffordp
cliffordp / functions.php
Last active May 9, 2017 05:57
Display Ticket image on event single page
<?php
// https://gist.github.com/cliffordp/013e3e43a3f3bca9b7cc
add_action( 'tribe_events_single_event_before_the_meta', 'forum_1005858_ticket_header_img' );
/*
could use different actions to output to different places on event single page
-- see /wp-content/plugins/the-events-calendar/src/views/single-event.php for more actions
-- also listed below:
tribe_events_single_event_before_the_content
tribe_events_single_event_after_the_content
@cliffordp
cliffordp / functions.php
Last active June 6, 2023 05:38
How to remove (dequeue) The Events Calendar's and PRO's styles.
<?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'
//
@jesseeproductions
jesseeproductions / tribe-ical-one-year.php
Last active December 5, 2017 05:18
The Events Calendar Get Events for 1 Year from Today in iCal Export File
/*
* The Events Calendar Get Events for 1 Year from Today in iCal Export File
* add coding to theme's functions.php
* @version 3.12
* trigger export with link: http://yoursite.com/events/?ical=1&year-feed
* change 365 for a different range
*/
add_action( 'pre_get_posts', 'tribe_one_year_ics_export' );
function tribe_one_year_ics_export( WP_Query $query ) {
if ( ! isset( $_GET['ical'] ) || ! isset( $_GET['year-feed'] ) ) {
@barryhughes
barryhughes / remove-payment-options-link.php
Last active April 12, 2017 21:56
Remove payment options link from frontend
@theeventscalendar
theeventscalendar / ticketsplus_woocommerce-products.php
Last active February 15, 2022 22:38 — forked from elimn/tribe_wootix_no_hijack.php
Allows customers to access the WooCommerce product page for tickets with Tickets Plus
<?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 );
@elimn
elimn / tribe_neuter_qr.php
Last active December 22, 2021 11:43
MT | TEC | Hide QR codes from the Email/Tickets sent to purchasers
<?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' ) );
}