PluginProbe ʕ •ᴥ•ʔ
WP Mail SMTP by WPForms – The Most Popular SMTP and Email Log Plugin / 2.0.0
WP Mail SMTP by WPForms – The Most Popular SMTP and Email Log Plugin v2.0.0
0.9.6 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.6.0 1.6.2 1.7.0 1.7.1 1.8.0 1.8.1 1.9.0 2.0.0 2.0.1 2.1.1 2.2.1 2.3.1 2.4.0 2.5.0 2.5.1 2.6.0 2.7.0 2.8.0 2.9.0 3.0.1 3.0.2 3.0.3 3.1.0 3.10.0 3.11.0 3.11.1 3.2.0 3.2.1 3.3.0 3.4.0 3.5.0 3.5.1 3.5.2 3.6.1 3.7.0 3.8.0 3.8.2 3.9.0 4.0.1 4.1.0 4.1.1 4.2.0 4.3.0 4.4.0 4.5.0 4.6.0 4.7.0 4.7.1 4.8.0 trunk 0.10.0 0.10.1 0.11.1 0.11.2 0.3.1 0.3.2 0.4 0.4.1 0.4.2 0.5.0 0.5.1 0.5.2 0.6 0.7 0.8 0.8.2 0.8.3 0.8.4 0.8.5 0.8.6 0.8.7 0.9.0 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5
wp-mail-smtp / uninstall.php
wp-mail-smtp Last commit date
assets 6 years ago src 6 years ago vendor 6 years ago readme.txt 6 years ago uninstall.php 6 years ago wp-mail-smtp.php 6 years ago wp_mail_smtp.php 6 years ago
uninstall.php
81 lines
1 <?php
2 /**
3 * Uninstall all WP Mail SMTP data.
4 *
5 * @since 1.3.0
6 */
7
8 // Exit if accessed directly.
9 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
10 exit;
11 }
12
13 // Load plugin file.
14 require_once 'wp_mail_smtp.php';
15
16 // Confirm user has decided to remove all data, otherwise stop.
17 $settings = get_option( 'wp_mail_smtp', array() );
18 if ( empty( $settings['general']['uninstall'] ) ) {
19 return;
20 }
21
22 /*
23 * Remove options.
24 */
25 $options = array(
26 'wp_mail_smtp_initial_version',
27 'wp_mail_smtp_version',
28 'wp_mail_smtp_debug',
29 'wp_mail_smtp',
30 '_amn_smtp_last_checked',
31 // Legacy options.
32 'pepipost_ssl',
33 'pepipost_port',
34 'pepipost_pass',
35 'pepipost_user',
36 'smtp_pass',
37 'smtp_user',
38 'smtp_auth',
39 'smtp_ssl',
40 'smtp_port',
41 'smtp_host',
42 'mail_set_return_path',
43 'mailer',
44 'mail_from_name',
45 'mail_from',
46 'wp_mail_smtp_am_notifications_hidden',
47 );
48
49 foreach ( $options as $option ) {
50 delete_option( $option );
51 }
52
53 /*
54 * Remove product announcements.
55 */
56 $announcements = get_posts(
57 array(
58 'post_type' => array( 'amn_smtp' ),
59 'post_status' => 'any',
60 'numberposts' => - 1,
61 'fields' => 'ids',
62 )
63 );
64 if ( ! empty( $announcements ) ) {
65 foreach ( $announcements as $announcement ) {
66 wp_delete_post( $announcement, true );
67 }
68 }
69
70 /*
71 * Logs for Pro plugin only.
72 */
73 if ( function_exists( 'wp_mail_smtp' ) && wp_mail_smtp()->is_pro() ) {
74 // DB version.
75 delete_option( 'wp_mail_smtp_logs_db_version' );
76 // DB table.
77 global $wpdb;
78 $table = \WPMailSMTP\Pro\Emails\Logs\Logs::get_table_name();
79 $wpdb->query( "DROP TABLE $table;" ); // phpcs:ignore
80 }
81