<?php
// If uninstall not called from WordPress, exit
if (!defined('WP_UNINSTALL_PLUGIN')) {
    exit();
}

// Load WordPress DB
global $wpdb;

// Table names
$email_table = $wpdb->prefix . 'unlockafe_email_capture';
$category_table = $wpdb->prefix . 'unlockafe_email_categories';
$popup_clicks_table = $wpdb->prefix . 'unlockafe_popup_clicks';

// Drop the tables if they exist
$wpdb->query("DROP TABLE IF EXISTS `$email_table`");
$wpdb->query("DROP TABLE IF EXISTS `$category_table`");
$wpdb->query("DROP TABLE IF EXISTS `$popup_clicks_table`"); 