Skip to content

Instantly share code, notes, and snippets.

View vicskf's full-sized avatar

Victor Zarranz vicskf

View GitHub Profile
@vicskf
vicskf / change_events_view_titles.php
Last active December 10, 2019 13:59 — forked from theeventscalendar/change_events_view_titles.php
Changes the title/headings on Events views
<?php
/*
* Alters event's archive titles
*/
function tribe_alter_event_archive_titles ( $original_recipe_title, $depth ) {
// Modify the titles here
// Some of these include %1$s and %2$s, these will be replaced with relevant dates
$title_upcoming = 'Upcoming Events'; // List View: Upcoming events
@vicskf
vicskf / force_cost.php
Last active March 8, 2019 18:47 — forked from GeoffEW/force_cost.php
/* Force the use of the cost field of event and ignore tickets price */
<?php
/* Force the use of the cost field of event and ignore tickets price */
function tribe_just_show_price_field ( $cost, $post_id, $with_currency_symbol ) {
$cost_utils = tribe( 'tec.cost-utils' );
$cost = tribe_get_event_meta( $post_id, '_EventCost' );
if ( $with_currency_symbol ) {
$cost = $cost_utils->maybe_format_with_currency( $cost );
}
@vicskf
vicskf / tickets-plus-disable-tax.php
Created December 5, 2017 21:21 — forked from jesseeproductions/tickets-plus-disable-tax.php
Event Tickets Plus - Disable Taxes for Ticket Products
/**
* 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' );
}