PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 3.1.0
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v3.1.0
5.12.0 5.13.0 5.13.1 5.11.0 5.10.0 5.9.0 5.8.0 5.8.1 5.7.0 5.6.2 5.6.3 5.6.1 5.6.0 5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 All 47 releases
double-opt-in / uninstall.php

uninstall.php in Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification 3.1.0, at uninstall.php

59 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace forge12\contactform7\CF7DoubleOptIn;
4
5 use Forge12\Shared\Logger;
6
7 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
8 die;
9 }
10
11 function drop_table_optin() {
12 global $wpdb;
13
14 $logger = Logger::getInstance();
15
16 $tableName = 'f12_cf7_doubleoptin';
17 $wpTableName = $wpdb->prefix . $tableName;
18
19 $logger->info( 'Dropping table if exists', [
20 'plugin' => 'double-opt-in',
21 'table_name' => $wpTableName,
22 'class' => __CLASS__ ?? null,
23 'method' => __FUNCTION__,
24 ] );
25
26 $wpdb->query( "DROP TABLE IF EXISTS " . $wpTableName );
27
28 $logger->info( 'Table dropped', [
29 'plugin' => 'double-opt-in',
30 'table_name' => $wpTableName,
31 ] );
32 }
33
34 function drop_table_categories() {
35 global $wpdb;
36
37 $logger = Logger::getInstance();
38
39 $tableName = 'f12_cf7_doubleoptin_categories';
40 $wpTableName = $wpdb->prefix . $tableName;
41
42 $logger->info( 'Dropping table if exists', [
43 'plugin' => 'double-opt-in',
44 'table_name' => $wpTableName,
45 'class' => __CLASS__ ?? null,
46 'method' => __FUNCTION__,
47 ] );
48
49 $wpdb->query( "DROP TABLE IF EXISTS " . $wpTableName );
50
51 $logger->info( 'Table dropped', [
52 'plugin' => 'double-opt-in',
53 'table_name' => $wpTableName,
54 ] );
55 }
56
57 drop_table_categories();
58 drop_table_optin();
59