# double-opt-in/3.1.0/uninstall.php

Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification, version 3.1.0. 59 lines.

- Page: https://pluginprobe.com/plugins/double-opt-in/3.1.0/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/double-opt-in/3.1.0/raw/uninstall.php
- Modified: 2025-09-23T13:34:24+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/double-opt-in/3.1.0/code/uninstall.php#L10-L20`.

```php
<?php

namespace forge12\contactform7\CF7DoubleOptIn;

use Forge12\Shared\Logger;

if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	die;
}

function drop_table_optin() {
	global $wpdb;

	$logger = Logger::getInstance();

	$tableName   = 'f12_cf7_doubleoptin';
	$wpTableName = $wpdb->prefix . $tableName;

	$logger->info( 'Dropping table if exists', [
		'plugin'     => 'double-opt-in',
		'table_name' => $wpTableName,
		'class'      => __CLASS__ ?? null,
		'method'     => __FUNCTION__,
	] );

	$wpdb->query( "DROP TABLE IF EXISTS " . $wpTableName );

	$logger->info( 'Table dropped', [
		'plugin'     => 'double-opt-in',
		'table_name' => $wpTableName,
	] );
}

function drop_table_categories() {
	global $wpdb;

	$logger = Logger::getInstance();

	$tableName   = 'f12_cf7_doubleoptin_categories';
	$wpTableName = $wpdb->prefix . $tableName;

	$logger->info( 'Dropping table if exists', [
		'plugin'     => 'double-opt-in',
		'table_name' => $wpTableName,
		'class'      => __CLASS__ ?? null,
		'method'     => __FUNCTION__,
	] );

	$wpdb->query( "DROP TABLE IF EXISTS " . $wpTableName );

	$logger->info( 'Table dropped', [
		'plugin'     => 'double-opt-in',
		'table_name' => $wpTableName,
	] );
}

drop_table_categories();
drop_table_optin();

```
