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 / 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();
@joshfeck
joshfeck / remove_copy_attendee_info.php
Created Jul 11, 2019
Event Espresso 4, remove copy attendee info template
View remove_copy_attendee_info.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE__EEH_Template__locate_template__full_template_paths',
'my_copy_attendee_info_template_do_not_load',
10,
2
);
function my_copy_attendee_info_template_do_not_load(
@joshfeck
joshfeck / yoast-seo-xml-single-event.php
Created Jul 5, 2019
Yoast SEO XML sitemap: remove the single-event archive URL from the sitemap
View yoast-seo-xml-single-event.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function ee_seo_xml_sitemap_no_event_type_single($url, $type, $term) {
if (! isset($term->taxonomy)) {
return $url;
}
if ($term->taxonomy == 'espresso_event_type') {
$url = '';
}
@joshfeck
joshfeck / events_rss.php
Last active Jul 5, 2019
Change the Events RSS feed pubDate for each event item. Event Espresso 4.
View events_rss.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function change_post_time_to_event_start($time, $d, $gmt) {
global $post;
$event = EEH_Event_View::get_event($post->ID);
if($event instanceof EE_Event) {
$primary_datetime = clone $event->primary_datetime();
$time = $primary_datetime->start_date_and_time('Y-m-d', 'H:i:s');
}
@joshfeck
joshfeck / venue_change_archive_order_example.php
Created Jun 24, 2019
Changes Event Espresso venues sort order to order by title (name). Also, removes pagination for venue post type archives.
View venue_change_archive_order_example.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter('pre_get_posts', 'order_venue_archive_by_title');
function order_venue_archive_by_title($query) {
if ( $query->is_archive &&
isset($query->query['post_type']) &&
$query->query['post_type']== 'espresso_venues' )
{
$query->set('orderby', 'title');
@joshfeck
joshfeck / custom_functions.php
Last active Jun 13, 2019
Event Espresso 3, send payment confirmation email to the admin too. Add this function to the site's /wp-content/uploads/espresso/custom_functions.php file
View custom_functions.php
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
if (!function_exists('event_espresso_send_payment_notification')) {
function event_espresso_send_payment_notification($atts) {
do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, '');
global $wpdb, $org_options;
You can’t perform that action at this time.