PluginProbe ʕ •ᴥ•ʔ
TaxCloud for WooCommerce / 8.4.11
TaxCloud for WooCommerce v8.4.11
8.4.11 8.4.10 8.4.9 trunk 6.0.11 6.0.12 6.0.13 6.0.14 6.1.0 6.1.1 6.1.2 6.2.0 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.2.6 6.3.0 6.3.1 6.3.10 6.3.11 6.3.12 6.3.13 6.3.2 6.3.3 6.3.4 6.3.5 6.3.6 6.3.7 6.3.8 6.3.9 7.0.0 7.0.1 7.0.10 7.0.11 7.0.12 7.0.13 7.0.2 7.0.3 7.0.4 7.0.5 7.0.6 7.0.7 7.0.8 7.0.9 8.0.0 8.0.1 8.0.10 8.0.11 8.0.12 8.0.13 8.0.14 8.0.15 8.0.16 8.0.17 8.0.2 8.0.3 8.0.4 8.0.5 8.0.6 8.0.7 8.0.8 8.0.9 8.1.0 8.1.1 8.2.0 8.2.1 8.2.2 8.2.3 8.2.4 8.3.0 8.3.1 8.3.2 8.3.3 8.3.4 8.3.5 8.3.6 8.3.7 8.3.8 8.4.0 8.4.1 8.4.2 8.4.3 8.4.4 8.4.5 8.4.6 8.4.7 8.4.8
simple-sales-tax / uninstall.php
simple-sales-tax Last commit date
assets 6 days ago build 11 months ago includes 6 days ago languages 6 days ago changelog.txt 6 days ago readme.txt 6 days ago simple-sales-tax.php 6 days ago uninstall.php 3 years ago webpack.config.js 5 months ago
uninstall.php
56 lines
1 <?php
2
3 /**
4 * Uninstalls Simple Sales Tax.
5 *
6 * Uninstalling removes all user roles, product data, and options.
7 *
8 * @author Simple Sales Tax
9 * @package SST
10 * @since 5.0
11 */
12
13 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
14 exit;
15 }
16
17 // Remove data, but only if "Remove Data on Delete" option is enabled
18 $settings = get_option( 'woocommerce_wootax_settings' );
19 $remove_data = isset( $settings['remove_all_data'] ) ? 'yes' === $settings['remove_all_data'] : false;
20
21 if ( $remove_data ) {
22 global $wpdb;
23
24 // Roles
25 remove_role( 'exempt-customer' );
26
27 // Options
28 $wpdb->query(
29 "
30 DELETE FROM {$wpdb->options}
31 WHERE option_name LIKE 'woocommerce\_wootax%'
32 OR option_name LIKE 'wootax\_%'
33 OR option_name LIKE 'tic\_%';
34 "
35 );
36
37 // Product settings
38 $wpdb->query(
39 "
40 DELETE FROM {$wpdb->postmeta}
41 WHERE meta_key LIKE '%wootax%';
42 "
43 );
44
45 // Category TICs
46 $wpdb->query(
47 "
48 DELETE FROM {$wpdb->termmeta}
49 WHERE meta_key = 'tic';
50 "
51 );
52
53 // Database tables
54 $wpdb->query( "DROP TABLE IF EXISTS {$wpdb->prefix}sst_tics" );
55 }
56