public static function handle() { if (!current_user_can('manage_options')) { wp_die('Not allowed'); } global $wpdb; // Clear ALL output buffers (Wordfence, notices, warnings, etc.) while (ob_get_level()) { ob_end_clean(); } $submissions = $wpdb->prefix . 'hav_submissions'; $venues = $wpdb->prefix . 'hav_venues'; $rows = $wpdb->get_results(" SELECT s.*, v.name AS venue_name FROM $submissions s LEFT JOIN $venues v ON v.id = s.venue_id ORDER BY s.submitted_at DESC ", ARRAY_A); header('Content-Type: text/csv; charset=utf-8'); header('Content-Disposition: attachment; filename=submissions.csv'); header('Pragma: no-cache'); header('Expires: 0'); echo "\xEF\xBB\xBF"; // UTF‑8 BOM $out = fopen('php://output', 'w'); fputcsv($out, [ 'ID', 'Venue', 'User Name', 'Submitted At', 'IP Address', 'Answers' ]); foreach ($rows as $r) { $answers = json_decode($r['answers'], true); $flat = []; if (is_array($answers)) { foreach ($answers as $qid => $val) { if (is_array($val)) { $flat[] = implode(', ', $val); } else { $flat[] = $val; } } } fputcsv($out, [ $r['id'], $r['venue_name'], $r['user_name'], $r['submitted_at'], $r['ip_address'], implode(' | ', $flat) ]); } fclose($out); // STOP WORDPRESS FROM RENDERING THE ADMIN PAGE exit; } Hire a Venue – South West Alternative Venues Skip to content
Back home

Venues for Hire in the South West of England

Venues for Hire in the South West of England

  • Our Venues
  • Region Map
  • Contract Lettings
  • About Us
    • Contact Us
    • Privacy Statement

Hire a Venue


Select a County

Share this:

  • Email a link to a friend (Opens in new window) Email
  • Print (Opens in new window) Print
  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Pinterest (Opens in new window) Pinterest

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.

To find out more, including how to control cookies, see here: Cookie Policy

· © 2026 South West Alternative Venues · Powered by · Designed with the Customizr Theme ·