check_tables(); hvac_debug_log('Tables exist check result', $tables_exist); if (!$tables_exist) { hvac_debug_log('Tables do not exist, showing error'); echo '
Certificate database tables are not properly set up. Please contact the administrator.
'; return; } // Get filtering parameters $filter_event = isset($_GET['filter_event']) ? absint($_GET['filter_event']) : 0; $filter_status = isset($_GET['filter_status']) ? sanitize_text_field($_GET['filter_status']) : 'active'; $page = isset($_GET['certificate_page']) ? absint($_GET['certificate_page']) : 1; $per_page = 20; // Build filter args $filter_args = array( 'page' => $page, 'per_page' => $per_page, 'orderby' => 'date_generated', 'order' => 'DESC', ); // Add event filter if selected if ($filter_event > 0) { $filter_args['event_id'] = $filter_event; } // Add status filter if ($filter_status === 'active') { $filter_args['revoked'] = 0; } elseif ($filter_status === 'revoked') { $filter_args['revoked'] = 1; } // Default 'all' doesn't add a filter // Get user's events for filtering $args = array( 'post_type' => Tribe__Events__Main::POSTTYPE, 'posts_per_page' => -1, 'post_status' => 'publish', 'author' => $current_user_id, 'orderby' => 'meta_value', 'meta_key' => '_EventStartDate', 'order' => 'DESC', ); // Allow admins to see all events if (current_user_can('edit_others_posts')) { unset($args['author']); } $events = get_posts($args); // Check if user has any events if (empty($events)) { // No certificates to show since user has no events $certificates = array(); $total_certificates = 0; $total_pages = 0; $certificate_stats = array( 'total' => 0, 'active' => 0, 'revoked' => 0, 'emailed' => 0 ); } else { // Get certificates for the current user with filters $certificates = $certificate_manager->get_user_certificates($current_user_id, $filter_args); // Get total certificate count for pagination $total_certificates = $certificate_manager->get_user_certificate_count($current_user_id, $filter_args); $total_pages = ceil($total_certificates / $per_page); // Get certificate statistics $certificate_stats = $certificate_manager->get_user_certificate_stats($current_user_id); } // Get header and footer get_header(); } catch (Exception $e) { echo '
Error initializing certificate system: ' . esc_html($e->getMessage()) . '
'; return; } ?>

Certificate Reports

View and manage all certificates you've generated for event attendees.

Certificate Statistics

Total Certificates

Active Certificates

Revoked Certificates

Emailed Certificates

Certificate Filters

Certificate Listing

No certificates found matching your filters.

0 || $filter_status !== 'active') : ?>

Clear filters to see all your certificates.

Generate certificates for your event attendees on the Generate Certificates page.

certificate_number; $event_id = $certificate->event_id; $attendee_id = $certificate->attendee_id; $generated_date = date_i18n(get_option('date_format'), strtotime($certificate->date_generated)); $is_revoked = (bool) $certificate->revoked; $is_emailed = (bool) $certificate->email_sent; // Get event and attendee information $event_title = get_the_title($event_id); $attendee_name = get_post_meta($attendee_id, '_tribe_tickets_full_name', true); if (empty($attendee_name)) { $attendee_name = 'Attendee #' . $attendee_id; } // Status text and class $status_text = $is_revoked ? 'Revoked' : 'Active'; $status_class = $is_revoked ? 'hvac-status-revoked' : 'hvac-status-active'; ?>
Certificate # Event Attendee Date Generated Status Actions
revoked_date)) : ?>
revoked_date))); ?>
Certificate has been revoked
1) : ?>
1) { $prev_url = add_query_arg('certificate_page', $page - 1); echo '« Previous'; } // Page numbers for ($i = 1; $i <= $total_pages; $i++) { $page_url = add_query_arg('certificate_page', $i); $class = $i === $page ? 'hvac-button hvac-pagination-current' : 'hvac-button'; echo '' . $i . ''; } // Next page link if ($page < $total_pages) { $next_url = add_query_arg('certificate_page', $page + 1); echo 'Next »'; } ?>
×

Certificate Preview

admin_url('admin-ajax.php'), 'viewNonce' => wp_create_nonce('hvac_view_certificate'), 'emailNonce' => wp_create_nonce('hvac_email_certificate'), 'revokeNonce' => wp_create_nonce('hvac_revoke_certificate') )); // Close the try block get_footer(); ?> Error in certificate reports: ' . esc_html($e->getMessage()) . ''; } ?>