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 | |
/** | |
* Make WooCommerce cart Quantity input field non-editable (readonly) ONLY FOR Event Tickets Plus products | |
* | |
* By Matt B and Cliff P | |
* | |
* From https://gist.github.com/cliffordp/66bf05df61ee269c60ff20d6f39e2cab | |
*/ | |
function cliff_etplus_woo_cart_quantity_readonly() { |
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
/** | |
* Event Tickets Plus - Disable Taxes for Ticket Products | |
*/ | |
add_action( 'wootickets_after_save_ticket', 'tribe_disable_taxes_ticket_product' ); | |
function tribe_disable_taxes_ticket_product( $ticket_id ) { | |
update_post_meta( $ticket_id, '_tax_status', 'none' ); | |
update_post_meta( $ticket_id, '_tax_class', 'zero-rate' ); | |
} |
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 tribe_custom_theme_text_with_context ( $translation, $text, $context, $domain ) { | |
// Put your custom text here in a key => value pair | |
// Example: 'Text you want to change' => 'This is what it will be changed to' | |
// The text you want to change is the key, and it is case-sensitive | |
// The text you want to change it to is the value | |
// You can freely add or remove key => values, but make sure to separate them with a comma | |
// This example changes the label "Venue" to "Location", and "Related Events" to "Similar Events" |
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
<?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 | |
/* | |
* For the following plugins: | |
* The Events Calendar, Event Tickets, Event Tickets Plus, WooCommerce | |
* | |
* The function hides the quantity form field from the cart page | |
* so users cannot change the product / ticket quantity there. | |
* It shows the number as plain text. | |
* Note: it only allows you to put 1 of all products in the cart!!! | |
* Useful if you are collecting attendee information with Event Tickets Plus |
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
/* | |
* 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 ) { |
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 Events Calendar - Make code empty if it's 0 or Free | |
*/ | |
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 = ''; |
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 Events Calendar + Event Tickets Plus + WooCommerce: Hide remaining | |
* quantity unless it is less than 4 (to create a sense of urgency). | |
* | |
* NOTE: We would need .each loop logic to work properly for more than just the | |
* first WooCommerce ticket if more than 1 WooCommerce ticket is available | |
* per event! | |
* | |
* If you want to ALWAYS hide (no sense of urgency logic), do not use this |