Skip to content

Instantly share code, notes, and snippets.

@andrasguseo
andrasguseo / items.php
Created January 12, 2024 21:29
ET > Template override to allow the sorting of ticket blocks on the front-end based on selected properties
<?php
/**
* A template override to allow the sorting of ticket blocks on the front-end based on selected properties.
*
* Block: Tickets
* Items
*
* This is a template override for the following file:
* event-tickets/src/views/v2/tickets/items.php
*
@andrasguseo
andrasguseo / ea-remove-taxonomies.php
Last active January 12, 2024 21:24
EA > Remove taxonomies (categories and tags) from an event before import.
<?php
/**
* Remove taxonomies (categories and tags) from an event before import.
*
* Usage: Add the snippet to your functions.php file or with a plugin like Code Snippets.
*
* @param array $event Which Event data was sent
*
* @return void
*
@andrasguseo
andrasguseo / ea-set-featured-image.php
Created January 11, 2024 22:38
EA > Set or change the featured image of an imported event.
@andrasguseo
andrasguseo / preserve-links.php
Last active March 20, 2024 13:51
EA > Preserve / reconvert links in Microsoft Teams invitations when imported from Outlook
@andrasguseo
andrasguseo / tec_search_transform_single_quotes.php
Created December 28, 2023 21:47
TEC > Transform all single quotes and apostrophes to straight single quotes in search string.
<?php
/**
* Transform all single quotes and apostrophes to straight single quotes in search string.
*
* Usage: Add the snippet to your functions.php file or with a plugin like Code Snippets
*
* Plugins required: The Events Calendar
* Author: Andras Guseo
* Created: December 28, 2023
*/
@andrasguseo
andrasguseo / change-subscribe-start-date.php
Created December 27, 2023 21:44
TEC > Move the starting date of the subscribe feed back by 2 months
<?php
/**
* Move the starting date of the subscribe feed back by 2 months.
*
* Usage: Add the snippet to your functions.php file or with a plugin like Code Snippets
*
* Plugins required: The Events Calendar
* Author: Andras Guseo
* Created: December 27, 2023
*/
@andrasguseo
andrasguseo / et-csv-import-columns.php
Last active January 12, 2024 21:24
ET+ > Add custom columns to Tickets CSV import
<?php
/**
* Add custom columns to Tickets CSV import.
* This example adds a column for product category (WooCommerce) and ticket fieldset.
* The values in the CSV file need to be prefixed. Please read in-line comments for instructions.
*
* Plugins required: Event Tickets Plus
* Author: Andras Guseo
* Created: December 12, 2023
*/
@andrasguseo
andrasguseo / rsvp.php
Created November 23, 2023 12:32
ET > Template override to allow the sorting of RSVP blocks on the front-end based on selected properties
<?php
/**
* A template override to allow the sorting of RSVP blocks on the front-end based on selected properties.
*
* Block: RSVP
*
* This is a template override for the following file:
* event-tickets/src/views/v2/rsvp.php
*
* This file should be placed in the following folder:
@andrasguseo
andrasguseo / pending-after-edit.php
Created November 3, 2023 20:56
CE > Set the post status to the "default status for submitted events" when a community event is edited
<?php
/**
* Set the post status to the "default status for submitted events" when a community event is edited.
*
* Plugins required: The Events Calendar, Community Events
* Author: Andras Guseo
* Created: November 3, 2023
*/
add_filter( 'tribe_events_event_update_args', 'tec_ce_pending_after_edit', 10, 3 );
@andrasguseo
andrasguseo / tag-imported-events.php
Last active December 8, 2023 21:45
EA > Add tags to imported events - advanced
<?php
/**
* Add tags to imported events.
*
* Plugins required: The Events Calendar
* Author: Andras Guseo
* Created: November 2, 2023
*/
add_action( 'tribe_aggregator_after_insert_post', 'tec_ea_add_tag_to_imported_events', 10, 3 );