getRender(); // Query $q = array( 'post_type'=>$this->PT, 'author'=>get_current_user_id(), 'posts_per_page'=>'-1', 'post_status'=>array('pending', 'draft', 'future', 'publish'), 'meta_query'=>array(), 'date_query'=>array(), 'orderby'=>'post_date', 'order'=>'DESC', ); // Hide Canceled Bookings if($hide_canceleds) { $q['meta_query'][] = array('key'=>'mec_verified', 'value'=>'-1', 'compare'=>'!='); } // Show Only Upcoming Bookings if($upcomings) { $q['date_query'] = array( 'after' => current_time('Y-m-d H:i:s'), ); } // The Query $query = new WP_Query($q); $id = 1; ?>
have_posts()): ?> have_posts()): $query->the_post(); $ID = get_the_ID(); $transaction_id = $this->book->get_transaction_id_book_id($ID); $event_id = get_post_meta($ID, 'mec_event_id', true); $ticket_ids = get_post_meta($ID, 'mec_ticket_id', true); $confirmed = get_post_meta($ID, 'mec_confirmed', true); $verified = get_post_meta($ID, 'mec_verified', true); if($verified == '-1') $status_class = 'mec-book-rejected'; elseif($confirmed == '1') $status_class = 'mec-book-confirmed'; elseif($confirmed == '-1') $status_class = 'mec-book-rejected'; else $status_class = 'mec-book-pending'; $transaction = $this->book->get_transaction($transaction_id); $timestamps = explode(':', get_post_meta($ID, 'mec_date', true)); $start_time = $timestamps[0]; $end_time = $timestamps[1]; $booking_options = get_post_meta($event_id, 'mec_booking', true); $bookings_all_occurrences = $booking_options['bookings_all_occurrences'] ?? 0; if($bookings_all_occurrences) { $dates = $render->dates($event_id, NULL, 1, NULL); if(is_array($dates) and count($dates) and isset($dates[0])) { $start_time = ((isset($dates[0]['start']) and isset($dates[0]['start']['timestamp'])) ? $dates[0]['start']['timestamp'] : 0); $end_time = ((isset($dates[0]['end']) and isset($dates[0]['end']['timestamp'])) ? $dates[0]['end']['timestamp'] : 0); } } // Check If Event Exist $db = $this->getDB(); $check_event_exist = $db->select("SELECT `ID` FROM `#__posts` WHERE `ID`=$event_id", 'loadResult'); $event = trim($check_event_exist) ? $render->data($event_id) : []; // Multiple Dates $all_dates = (isset($transaction['all_dates']) and is_array($transaction['all_dates'])) ? $transaction['all_dates'] : []; ?> ID, $ID, $event); ?>
$attendee) { if(!is_numeric($attendee_i)) continue; echo '
'; echo ''.esc_html($person_id).''; echo ''.(isset($attendee['_name']) ? esc_html($attendee['_name']) : esc_html($attendee['name'])).''; echo ''.esc_html($attendee['email']).''; echo ''.((isset($event->tickets[$attendee['id']]) ? esc_html($event->tickets[$attendee['id']]['name']) : '').' '.(isset($event->tickets[$attendee['id']]) ? esc_html($event->tickets[$attendee['id']]['price_label']) : '')).''; // Ticket Variations echo ''; if(isset($attendee['variations']) and is_array($attendee['variations']) and count($attendee['variations'])) { $ticket_variations = $this->main->ticket_variations((trim($check_event_exist) ? $event_id : NULL), $attendee['id']); foreach($attendee['variations'] as $variation_id=>$variation_count) { if(!$variation_count or $variation_count < 0) continue; $variation_title = (isset($ticket_variations[$variation_id]) and isset($ticket_variations[$variation_id]['title'])) ? $ticket_variations[$variation_id]['title'] : ''; if(!trim($variation_title)) continue; echo ''.' + '.esc_html($variation_title).' ('.esc_html($variation_count).')'.''; } } else { echo '-'; } echo ''; $person_id++; echo '
'; } } ?>
ID) or !isset($event->title)) : ?> title); ?>
main->get_verification_label($verified)) : esc_html($this->main->get_confirmation_label($confirmed)); ?> - ID)) { $location_id = $this->main->get_master_location_id($event); $location_latitude = $event->locations[$location_id]['latitude'] ?? NULL; $location_longitude = $event->locations[$location_id]['longitude'] ?? NULL; } ?> ">