Skip to content

Instantly share code, notes, and snippets.

Josh Feck joshfeck

Block or report user

Report or block joshfeck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@joshfeck
joshfeck / re-order.php
Created Sep 12, 2019
Post Types Order for Event Espresso 4. Companion to the Post Types Order plugin. This plugin adds a page to re-order Event Espresso events
View re-order.php
<?php
/*
Plugin Name: Post Types Order for Event Espresso
Description: Companion to the Post Types Order plugin. This plugin adds a page to re-order Event Espresso events
Author: Event Espresso support staff
Version: 1.0
*/
add_filter(
'FHEE__EE_Register_CPTs__get_CPTs__cpts',
'ee_modify_show_ui_for_events_cpt'
@joshfeck
joshfeck / custom_column_registrations.php
Last active Sep 6, 2019
Adds a "Transaction Number" column to the Event Espresso > Registrations page. Event Espresso 4
View custom_column_registrations.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE_manage_event-espresso_page_espresso_registrations_columns',
'my_filter_registration_list_table_columns',
10,
2
);
add_action(
@joshfeck
joshfeck / adjacent_posts_filter.php
Created Sep 6, 2019
Change the next and previous post links sort order and filter out expired events for single espresso_events post types. Requires EE4 + a theme that uses the native next_post_link() and previous_post_link() functions.
View adjacent_posts_filter.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action( 'template_redirect', 'ee_custom_filtered_adjacent_post' );
function ee_custom_filtered_adjacent_post() {
add_filter( 'get_next_post_join', 'ee_custom_filtered_adjacent_post_join' );
add_filter( 'get_previous_post_join', 'ee_custom_filtered_adjacent_post_join' );
add_filter( 'get_next_post_where', 'ee_custom_filtered_adjacent_post_where' );
add_filter( 'get_previous_post_where', 'ee_custom_filtered_adjacent_post_where' );
@joshfeck
joshfeck / ticket_sales_ended.php
Created Sep 3, 2019
Add some text that says "Registrations Closed" to Event Espresso's single event, archive events, and calendar views if the event is upcoming but ticket sales have ended
View ticket_sales_ended.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter('the_title', 'ee_add_on_sale_status_display', 101, 2);
function ee_add_on_sale_status_display($title, $id) {
if(get_post_type($id) == 'espresso_events') {
$html = '';
$tickets = EEH_Event_View::event_tickets_available($id);
if(empty($tickets)) {
$html = '<span class="ee-status small-text '
@joshfeck
joshfeck / calendar_tooltip.php
Created Aug 27, 2019
Change display of attendee limit text in Event Espresso 4's calendar tooltip
View calendar_tooltip.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE__EE_Calendar__get_calendar_events__tooltip_reg_btn_html',
'my_custom_calendar_available_spaces',
10,
3
);
function my_custom_calendar_available_spaces(
@joshfeck
joshfeck / venue_calendar.php
Created Aug 16, 2019
Add venue information to the Event Espresso 4 calendar tooltip. You can add this code to a functions plugin or, if available, into your WordPress child theme's functions.php file.
View venue_calendar.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE__EE_Calendar__get_calendar_events__tooltip_reg_btn_html',
'my_custom_calendar_tooltip_add_venue',
10,
3
);
function my_custom_calendar_tooltip_add_venue(
@joshfeck
joshfeck / tracking_code_example.php
Created Aug 2, 2019
Tracking code example for Event Espresso 4. Adds event-specific tracking code to the thank you page if "tracking_value" custom field is set in event.
View tracking_code_example.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action(
'AHEE__thank_you_page_overview_template__top',
'my_custom_tracking_code_function'
);
function my_custom_tracking_code_function($transaction) {
if ( $transaction instanceof EE_Transaction ) {
$registrations = $transaction->registrations();
@joshfeck
joshfeck / checkins.php
Last active Aug 7, 2019
Add a timestamp column and change the sort order to the Attendee Checkin admin page. Event Espresso 4.
View checkins.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE_manage_event-espresso_page_espresso_registrations_columns',
'my_filter_registration_list_table_columns',
10,
2
);
add_action(
@joshfeck
joshfeck / is_no_sku_for_you.php
Created Jul 19, 2019
Infusionsoft + Event Espresso 4. Do not send a product sku when adding/updating events & tickets
View is_no_sku_for_you.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE__EEE_Infusionsoft_Ticket__sync_to_infusionsoft__product_data',
'my_do_not_send_a_sku',
10,
2
);
function my_do_not_send_a_sku($product_data, $ticket) {
@joshfeck
joshfeck / eea_is_track_guests_to_primary.php
Created Jul 12, 2019
Event Espresso 4, Infusionsoft. Add a custom field value for "Primary Attendee" to guest contact records.
View eea_is_track_guests_to_primary.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function ee_is_track_attendee_back_to_purchaser( $is_contact_data, $ee_attendee ) {
if( $ee_attendee instanceof EE_Attendee ) {
$checkout = EE_Registry::instance()->SSN->checkout();
if ( $checkout instanceof EE_Checkout ) {
$transaction = $checkout->transaction;
if ( $transaction instanceof EE_Transaction ) {
$primary_reg = $transaction->primary_registration();
You can’t perform that action at this time.