Skip to content

Instantly share code, notes, and snippets.

@theeventscalendar
theeventscalendar / woo-disable-ticket-email
Last active November 14, 2015 00:44
WooCommerce Tickets 3.12.1 // Disable ticket email from sending
/**
Plugin Name: WooCommerce Tickets: Disable Ticket Emails
Description: Turns off ticket emails that are automatically sent from WooCommerce Tickets
Version: 1.0
**/
function wootickets_email_no_no() {
return 'no';
}
@theeventscalendar
theeventscalendar / link_to_fb_event.php
Last active November 19, 2015 17:07 — forked from elimn/tribe_link_to_fb_event.php
Add a link to the original Facebook event from an imported event listing
@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 );
@theeventscalendar
theeventscalendar / EventWebsiteLink2.php
Last active December 28, 2020 13:22 — forked from barryhughes/EventWebsiteLink.php
Make an Event Website a link instead of showing the text url. This version opens a new window with the additional target=blank code.
<?php
add_filter( 'tribe_get_event_website_link_label', 'tribe_get_event_website_link_label_default' );
function tribe_get_event_website_link_label_default( $label ) {
if ( $label === tribe_get_event_website_url() ) {
$label = "Visit Website &raquo;";
}
return '<a href="' . tribe_get_event_website_url() . '" target="_blank">' . $label . '</a>';
}