PluginProbe
Additional Terms Lite for WooCommerce / trunk
Additional Terms Lite for WooCommerce vtrunk
1.7.3 1.7.2.1 trunk 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.6.2 1.6.3 All 35 releases
woo-additional-terms / uninstall.php

uninstall.php in Additional Terms Lite for WooCommerce trunk, at uninstall.php

33 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Uninstall Woo Additional Terms.
4 * Fired when the plugin is uninstalled.
5 *
6 * @since 1.0.0
7 *
8 * @package woo-additional-terms
9 */
10
11 defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
12 defined( 'WP_UNINSTALL_PLUGIN' ) || exit; // If uninstall not called from WordPress, then exit.
13
14 // Delete the onboarding (welcome) notice preference.
15 delete_site_option( 'woo_additional_terms_onboarding' );
16
17 // Delete the already rated preference.
18 delete_option( 'woo_additional_terms_rated' );
19
20 // Reset the activation timestamp as the user already decided to delete the plugin.
21 delete_site_option( 'woo_additional_terms_activation_timestamp' );
22
23 /*
24 * Only perform uninstall if WC_REMOVE_ALL_DATA constant is set to true in user's
25 * wp-config.php. This is to prevent data loss when deleting the plugin from the backend
26 * and to ensure only the site owner can perform this action.
27 */
28 if ( defined( 'WC_REMOVE_ALL_DATA' ) && true === WC_REMOVE_ALL_DATA ) {
29 delete_option( 'woo_additional_terms_options' );
30 // For site options in Multisite.
31 delete_site_option( 'woo_additional_terms_options' );
32 }
33