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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
// prints a per event attendee list right after the event details on a single event page | |
// you can change the action hook that's on the next line to display the list in another location | |
add_action( 'AHEE_event_details_after_the_content', 'ee_attendee_list' ); | |
function ee_attendee_list(){ | |
global $wpdb, $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
<?php // remove this line if your functions file already has an opening PHP tag | |
/** | |
* Creates a nicely formatted and more specific title element text | |
* for output in head of document, based on current event. | |
* | |
*/ | |
function ee_reg_page_title( $title, $sep ) { |
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 // remove if there's already an opening PHP tag in your funcitons.php file | |
add_filter ( 'filter_hook_espresso_calendar_sef_and_start_end_dates', 'my_custom_calendar_query_not_yet_ended' ); | |
function my_custom_calendar_query_not_yet_ended() { | |
// this will filter the query so events that have closed for registration, but haven't ended yet, | |
// will display when show_expired is false | |
$today = date( 'Y-m-d' ); | |
$sql = " AND e.end_date >= '$today' "; | |
return $sql; |
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 espresso_infusionsoft_save_date_field($attendee_data) { | |
$clean_attendee_data = array( | |
//Example of a custom contact data field | |
//NOTE: You must prepend custom field database names with an underscore when accessing them through the API | |
'_CustomDateField' => $attendee_data['start_date'], | |
); | |
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
function my_itemised_surcharge($registration_ids, $attendees){ | |
$options = get_option('events_organization_settings'); | |
$currency = $options['currency_symbol']; | |
$this->SetFillColor(192,192,192); | |
// pull the selected ticket price breakdown from the database | |
global $wpdb, $org_options; | |
foreach( $registration_ids as $registration_id ) { | |
$price_query = "SELECT event_id, price_option FROM " . EVENTS_ATTENDEE_TABLE . " WHERE registration_id=%s"; |
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
// suggested code placement is right after the line that says: | |
// $pdf->ImprovedTable($header, $attendees, $w, $alling); | |
$pdf->Ln(1); | |
$pdf->my_itemised_surcharge($registration_ids, $attendees); |
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 | |
//* Please do NOT include the above opening php tag | |
function my_itemised_surcharge( $attendees ){ | |
$options = get_option( 'events_organization_settings' ); | |
$currency = $options['currency_symbol']; | |
$this->SetFillColor( 239,239,239 ); | |
// pull the selected ticket price breakdown from the database | |
global $org_options; |
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
<ul class="course-list"> | |
<?php | |
if( function_exists( 'espresso_reg_url' )) { | |
global $wpdb; | |
$tablename = EVENTS_DETAIL_TABLE; | |
$courses = $wpdb->get_results("SELECT * FROM $tablename WHERE start_date >= '" . date('Y-m-d') . "' AND event_status <> 'D' ORDER BY start_date "); | |
foreach ( $courses as $course ){ | |
echo '<li><a href="' . espresso_reg_url($course->id) . '">' . stripslashes($course->event_name) . '</a></li>'; | |
} | |
} |
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 | |
/** | |
* @package Payment Settings Fixer | |
* @version 0.1 | |
*/ | |
/* | |
Plugin Name: Payment Settings Fixer | |
Plugin URI: https://github.com/joshfeck | |
Description: A little patch to fix a strange issue in some WPEngine sites' admin for the Event Espresso 3 Payment settings page | |
Author: Josh Feck |
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 if ( have_posts() ) : ?> | |
<table class="events"> | |
<thead> | |
<tr> | |
<th>Event</th> | |
<th>Tickets available</th> | |
<th>Starts</th> | |
<tr> | |
</thead> |