<th scope="col" id="title" class="manage-column column-title sortable desc" style="">Protege</th> <th scope="col" id="author" class="manage-column column-author" style="">B.Cert.No.</th> <th scope="col" id="categories" class="manage-column column-categories" style="">Parent Name</th> <th scope="col" id="tags" class="manage-column column-tags" style="">Parent No.</th> <th scope="col" id="date" class="manage-column column-date sortable asc" style=""> Source </th> <th scope="col" id="date" class="manage-column column-date sortable asc" style=""> Reg. Date </th> <th scope="col" id="date" class="manage-column column-date sortable asc" style=""> Course Date </th> <th scope="col" id="date" class="manage-column column-date sortable asc" style=""> Invoice No. </th> <th scope="col" id="date" class="manage-column column-date sortable asc" style=""> Status </th> </tr> </thead> <tbody id="the-list"> <?php foreach ($user_protege as $protege_id) { $protege_orders = User::getOrdersByDate($protege_id, $date_type); if (!empty($protege_orders)) { $protege_form_id = User::getRegistrationFormID($protege_id); $protege_form = User::getRegistrationForm($protege_form_id); $protege_status = ''; $ptotege_invoice = ''; $protege_course_start = ''; foreach ($protege_orders as $order) { $order_obj = new \WC_Order($order->ID); $order_items = $order_obj->get_items(); $protege_course_id = db::getEntryMeta($order->ID, $user_fields['course']); $ptotege_invoice = db::getEntryMeta($order->ID, '_transaction_id')[0]; if ($protege_course_id) { $stages = Course::getChilds($protege_course_id); foreach ($stages as $stage) { $stage_name = Event::getNameByID($stage->ID);