/** * Dispatches a confirmation email that acknowledges the user has RSVP'd * in cases where they have indicated that they will *not* be attending. * * @param int $order_id * @param int $event_id */ public function send_non_attendance_confirmation($order_id, $event_id) { $attendees = $this->get_attendees_by_transaction($order_id); if (empty($attendees)) { return; } // For now all ticket holders in an order share the same email $to = $attendees['0']['holder_email']; if (!is_email($to)) { return; } $headers = apply_filters('tribe_rsvp_email_headers', array('Content-type: text/html')); $attachments = apply_filters('tribe_rsvp_email_attachments', array()); $to = apply_filters('tribe_rsvp_email_recipient', $to); $subject = apply_filters('tribe_rsvp_email_subject', sprintf(__('You confirmed you will not be attending %s', 'event-tickets'), get_the_title($event_id))); $template_data = array('event_id' => $event_id, 'order_id' => $order_id, 'attendees' => $attendees); $content = apply_filters('tribe_rsvp_email_content', tribe_tickets_get_template_part('tickets/email-non-attendance', null, $template_data, false)); wp_mail($to, $subject, $content, $headers, $attachments); }
/** * @param int $tgt_ticket_type_id * @param int $src_event_id * @param int $tgt_event_id * @param array $affected_tickets * * @return string */ protected function generate_email_content($tgt_ticket_type_id, $src_event_id, $tgt_event_id, $affected_tickets) { $vars = array('original_event_id' => $src_event_id, 'original_event_name' => get_the_title($src_event_id), 'new_event_id' => $tgt_event_id, 'new_event_name' => get_the_title($tgt_event_id), 'ticket_type_id' => $tgt_ticket_type_id, 'ticket_type_name' => get_the_title($tgt_ticket_type_id), 'affected_tickets' => $affected_tickets); return tribe_tickets_get_template_part('tickets/email-tickets-moved', null, $vars, false); }
/** * Outputs the attendee list checkbox * */ public function output_attendee_list_checkbox($attendee_group, $post_id) { if (Tribe__Tickets_Plus__Attendees_List::is_hidden_on($post_id)) { return; } $first_attendee = reset($attendee_group); $args = array('attendee_group' => $attendee_group, 'post_id' => $post_id, 'first_attendee' => $first_attendee); if (doing_action('event_tickets_user_details_rsvp')) { $template_part = 'tickets-plus/attendee-list-checkbox-rsvp'; } else { $template_part = 'tickets-plus/attendee-list-checkbox-tickets'; } tribe_tickets_get_template_part($template_part, null, $args); }
} ?> </div> <?php } ?> <!-- Notices --> <?php tribe_the_notices(); ?> <form method="post"> <?php tribe_tickets_get_template_part('tickets/orders-rsvp'); ?> <?php /** * Fires before the process tickets submission button is rendered */ do_action('tribe_tickets_orders_before_submit'); ?> <?php if ($view->has_rsvp_attendees($event_id) || $view->has_ticket_attendees($event_id)) { ?> <div class="tribe-submit-tickets-form"> <button type="submit" name="process-tickets" value="1" class="button alt"><?php echo sprintf(esc_html__('Update %s', 'event-tickets'), $view->get_description_rsvp_ticket($event_id, get_current_user_id(), true));