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 flightdeck_event_created_email($params) { | |
global $wpdb; | |
$event_id = $params['event_id']; | |
$sql = "SELECT evt.id, evt.event_name, evt.start_date, evt.end_date, se.start_time, se.end_time, v.name as venue_name, v.address, v.address2, v.city, v.state, v.zip FROM " . EVENTS_DETAIL_TABLE . " evt "; | |
$sql .= "LEFT JOIN " . EVENTS_VENUE_REL_TABLE . " r ON r.event_id = evt.id LEFT JOIN " . EVENTS_VENUE_TABLE . " v ON v.id=r.venue_id "; | |
$sql .= "LEFT JOIN " . EVENTS_START_END_TABLE . " se ON se.event_id = evt.id "; | |
$sql .= "WHERE evt.id=" . $event_id; | |
$event = array_shift($wpdb->get_results($sql)); | |
$body = ""; |
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
// This goes in the themes functions.php | |
function fullwood_logout_url() { | |
// Gets the current user | |
$current_user = wp_get_current_user(); | |
// Gets their roles | |
$current_user_roles = $current_user->roles; | |
// Checks to see if they have the client role | |
if (in_array('client', $current_user_roles)) { |
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 espresso_email_after_payment($payment_data) { | |
global $org_options; | |
if ($payment_data['payment_status'] == 'Completed') { | |
event_espresso_send_payment_notification(array('attendee_id' => $payment_data['attendee_id'], 'registration_id' => $payment_data['registration_id'])); | |
$send_admin_email = 'true'; | |
if ( is_user_logged_in() ) { | |
$send_admin_email = 'false'; | |
} |
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 ( is_user_logged_in() ) { ?> | |
<form method="post" action="<?php echo home_url(); ?>/?download_invoice=true&admin=true&registration_id=<?php echo $registration_id ?>" > | |
<input type="submit" class="print_button noPrint" value="<?php _e('Download Invoice', 'event_espresso'); ?>"> | |
</form> | |
<?php } ?> |
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
// Horrible code to forful Vendor Tx Code requirement | |
$referrer_sql = "SELECT * FROM wp_events_answer WHERE attendee_id = \"$attendee_id\" and question_id = \"12\""; | |
if (!$referrer_row = $wpdb->get_row($referrer_sql)) { | |
$referrer = "website-default"; | |
} else { | |
$referrer = $referrer_row->answer; | |
} |
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 ($payment_status == 'Completed') { ?> | |
<tr> | |
<td>Your Tickets</td> | |
<td> | |
<?php | |
echo custom_espresso_ticket_links($registration_id, $attendee_id, $txn_id); | |
?> | |
</td> | |
</tr> | |
<?php } ?> |
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 custom_espresso_ticket_links($registration_id, $attendee_id, $txn_id, $email = FALSE) { | |
global $wpdb; | |
$sql = "SELECT * FROM " . EVENTS_ATTENDEE_TABLE; | |
if (espresso_is_primary_attendee($attendee_id) != true) { | |
$sql .= " WHERE id = '" . $attendee_id . "' "; | |
} else { | |
$sql .= " WHERE txn_id = '" . $txn_id . "' "; | |
} | |
//echo $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
function admin_emails_function() { | |
$admin_emails = array(); | |
$args = array( | |
'role' => 'Administrator', | |
'fields' => 'all_with_meta' | |
); | |
$user_query = new WP_User_Query( $args ); | |
$admins = $user_query->get_results(); | |
foreach ($admins as $admin) { | |
$admin_emails[] = $admin->user_email; |