This file contains hidden or 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 espresso_ical_prepare_by_meta($meta, $title = '', $image = '', $link_only = FALSE) { | |
| global $org_options, $wpdb; | |
| do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, ''); | |
| if ( !empty($org_options['display_ical_download']) && $org_options['display_ical_download'] == 'N' || !isset($org_options['display_ical_download']) ){ | |
| return; | |
| } | |
| $start_date_object = DateTime::createFromFormat(get_option('date_format').' G:i', $meta['start_date'] . ' ' . $meta['start_time']); | |
| $start_date = !empty($start_date_object) ? $start_date_object->getTimestamp() : ''; | |
| $end_date_object = DateTime::createFromFormat(get_option('date_format').' G:i', $meta['end_date'] . ' ' . $meta['end_time']); | |
| $end_date = !empty($end_date_object) ? $end_date_object->getTimestamp() : ''; |
This file contains hidden or 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
| // Add this section to the end of gateways/invoice/init.php | |
| // This is for the thank you page | |
| if (!empty($_REQUEST['type']) && $_REQUEST['type'] == 'invoice') { | |
| event_espresso_require_gateway("invoice/invoice_ipn.php"); | |
| add_filter('filter_hook_espresso_transactions_get_attendee_id', 'espresso_transactions_invoice_get_attendee_id'); | |
| add_filter('filter_hook_espresso_thank_you_get_payment_data', 'espresso_process_invoice'); | |
| } | |
This file contains hidden or 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 | |
| // add as uploads/espresso/templates/attendee_list.php | |
| // note the enqueue script on line 47. You'll need to upload sortable.min.js and adjust the location | |
| // also it has been customized for questions #39 and 40. YMMV. | |
| //List Attendees Template | |
| //Show a list of attendees using a shortcode | |
| //[LISTATTENDEES] | |
| //[LISTATTENDEES limit="30"] | |
| //[LISTATTENDEES show_expired="false"] |
This file contains hidden or 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 espresso_reject_attendee_by_email_address($attendee_data) { | |
| if(file_exists(EVENT_ESPRESSO_UPLOAD_DIR."blocks.txt")) { | |
| $blocks = file(EVENT_ESPRESSO_UPLOAD_DIR."blocks.txt",FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); | |
| if(in_array($attendee_data['email'], $blocks)) { | |
| global $wpdb; | |
| $wpdb->delete(EVENTS_ATTENDEE_TABLE, array('id'=>$attendee_data['attendee_id']), array('%d')); | |
| } | |
| } | |
| } | |
| add_action('action_hook_espresso_save_attendee_data', 'espresso_reject_attendee_by_email_address'); |
This file contains hidden or 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 event_espresso_send_payment_notification($atts) { | |
| do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, ''); | |
| global $org_options; | |
| //Extract the attendee_id and registration_id | |
| extract($atts); | |
| event_espresso_email_confirmations(array('attendee_id' => $attendee_id, 'send_admin_email' => 'false', 'send_attendee_email' => 'true', 'custom_data' => array('email_type' => 'payment', 'payment_subject' => $org_options['payment_subject'], 'payment_message' => $org_options['payment_message']))); | |
| return; | |
| } |
This file contains hidden or 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
| --- a/includes/admin-files/optional_event_settings.php | |
| +++ b/includes/admin-files/optional_event_settings.php | |
| @@ -103,7 +103,13 @@ $values=array( | |
| <?php _e('Allow discounts in the shopping cart?','event_espresso'); ?> | |
| </label> | |
| <?php echo select_input('allow_mer_discounts', $values, isset($org_options['allow_mer_discounts']) ? $org_options['allow_mer_discounts'] : ''); ?> <br /> | |
| - </li> | |
| + </li> | |
| + <li> | |
| + <label> |
This file contains hidden or 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
| <tr> | |
| <?php | |
| $attendees = $wpdb->get_results($wpdb->prepare("SELECT registration_id, id, event_id, fname, lname FROM ".EVENTS_ATTENDEE_TABLE." WHERE attendee_session=%s", $attendee_session), OBJECT); | |
| foreach ($attendees as $attendee) { | |
| echo espresso_edit_attendee($attendee->registration_id, $attendee->id, $attendee->event_id, 'attendee', sprintf(__('Edit Registration Details for %s, %s','event_espresso'), $attendee->lname, $attendee->fname)); ?><br/> | |
| <?php } ?> | |
| </tr> | |
| // Not sure why it jumps out of the table to above it. |
This file contains hidden or 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
| <script> | |
| jQuery( document ).ready( function() { | |
| jQuery('.DROPDOWN_37').html(''); | |
| jQuery('.DROPDOWN_36').on('change', function() { | |
| switch(jQuery(this).val()) { | |
| case '1': | |
| jQuery('.DROPDOWN_37').html('<option value="">Select One</option><option value="1"> 1</option><option value="2"> 2</option><option value="3"> 3</option>'); | |
| break; | |
| case '2': | |
| jQuery('.DROPDOWN_37').html('<option value="">Select One</option><option value="4"> 4</option><option value="5"> 5</option><option value="6"> 6</option>'); |
This file contains hidden or 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 espresso_prepare_payment_data_for_gateways_custom( $payment_data ) { | |
| remove_filter('filter_hook_espresso_prepare_payment_data_for_gateways', 'espresso_prepare_payment_data_for_gateways'); | |
| global $wpdb, $org_options; | |
| $SQL = "SELECT ea.price_option, ea.email, ea.event_id, ea.registration_id, ea.txn_type, ed.start_date,"; | |
| $SQL .= " ea.attendee_session, ed.event_name, ea.lname, ea.fname, ea.total_cost,"; | |
| $SQL .= " ea.payment_status, ea.payment_date, ea.address, ea.city, ea.txn_id,"; | |
| $SQL .= " ea.zip, ea.state, ea.phone, ed.event_meta FROM " . EVENTS_ATTENDEE_TABLE . " ea"; | |
| $SQL .= " JOIN " . EVENTS_DETAIL_TABLE . " ed ON ed.id=ea.event_id"; | |
| $SQL .= " WHERE ea.id = %d"; | |
| $temp_data = $wpdb->get_row( $wpdb->prepare( $SQL, $payment_data['attendee_id'] ), ARRAY_A ); |
This file contains hidden or 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 espresso_attendees_data_sc($atts) { | |
| global $wpdb, $org_options, $this_event_id; | |
| extract(shortcode_atts(array('event_id' => $this_event_id, 'type' => ''), $atts)); | |
| $event_id = "{$event_id}"; | |
| $type = "{$type}"; | |
| $data = get_number_of_attendees_reg_limit($event_id, $type); | |
| return $data; | |
| } |