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
| 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
| 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
| <?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
| // 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
| 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
| // unfortunately, the function does not currently have a pluggable function wrapper, | |
| // so the best course of action right now is to add the pluggable function wrapper in core, | |
| // then add the overriding function into a custom function holding location. | |
| // so in includes/admin-reports/add_new_attendees.php add this as line 2: | |
| if (!function_exists('add_new_attendee')) { | |
| // then add the closing brace at the end of the file: | |
| } | |
| // that way, whenever the client updates and loses the custom functionality, all you need to do is | |
| // add the pluggable function wrapper back in. And in a future update, we will probably add the | |
| // pluggable function wrapper in. |
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 | |
| /*Custom Log Function Include*/ | |
| // require('log.php'); | |
| /*End Custom Log Function Include*/ | |
| if (isset($_SESSION['espresso_session']['id'])) { | |
| unset($_SESSION['espresso_session']['id']); | |
| } | |
| define('FPDF_FONTPATH', EVENT_ESPRESSO_PLUGINFULLPATH . 'class/fpdf/font/'); | |
| require_once EVENT_ESPRESSO_PLUGINFULLPATH . 'class/fpdf/fpdf.php'; |
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_display_all_event_times($event_id) { | |
| global $wpdb; | |
| $sql = "SELECT ese.start_time, ese.end_time "; | |
| $sql .= "FROM " . EVENTS_START_END_TABLE . " ese WHERE ese.event_id = %d"; | |
| $times = $wpdb->get_results($wpdb->prepare($sql, $event_id)); | |
| if(empty($times)) return NULL; | |
| $time_format = get_option('time_format'); | |
| $output = "<p>"; | |
| foreach ($times as $time) { | |
| $output .= "<span>" . event_date_display($time->start_time, $time_format) . " - " . event_date_display($time->end_time, $time_format) . "</span>"; |
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
| //this goes in includes/admin-files/event_newsletter.php at line 49 (approx) | |
| <li> | |
| <select name="filter"> | |
| <option value="all"><?php _e("All attendees of this event", "event_espresso"); ?></opton> | |
| <option value="completed"><?php _e("Completed payment status attendees", "event_espresso"); ?></opton> | |
| <option value="incomplete"><?php _e("Incomplete payment status attendees", "event_espresso"); ?></opton> | |
| <option value="pending"><?php _e("Pending payment status attendees", "event_espresso"); ?></opton> | |
| </select> | |
| </li> |