PluginProbe
Additional Terms Lite for WooCommerce / 1.2.2
Additional Terms Lite for WooCommerce v1.2.2
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
← All changes | uninstall.php +13 -25 1.4.11.2.2 View file →
@@ -2,32 +2,20 @@
2 2 /**
3 3 * Unistall Woo Additional Terms.
4 4 * Fired when the plugin is uninstalled.
5 5 *
6 - * @package Woo Additional Terms
7 - * @since 1.0.0
6 + * @package Woo Additional Terms
7 + * @since 1.2.1
8 8 */
9 9
10 -defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
11 -defined( 'WP_UNINSTALL_PLUGIN' ) || exit; // If uninstall not called from WordPress, then exit.
10 +// If uninstall not called from WordPress, then exit.
11 +if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
12 + exit;
13 +} // End If Statement
12 14
13 -// Reset the activation timestamp as the user already decided to delete the plugin.
14 -delete_site_option( 'woo_additional_terms_activation_timestamp' );
15 -
16 -/*
17 - * Only perform uninstall if WC_REMOVE_ALL_DATA constant is set to true in user's
18 - * wp-config.php. This is to prevent data loss when deleting the plugin from the backend
19 - * and to ensure only the site owner can perform this action.
20 - */
21 -if ( defined( 'WC_REMOVE_ALL_DATA' ) && true === WC_REMOVE_ALL_DATA ) {
22 - $woo_additional_terms_page_id = '_woo_additional_terms_page_id';
23 - $woo_additional_terms_notice = '_woo_additional_terms_notice';
24 - $woo_additional_terms_error = '_woo_additional_terms_error';
25 -
26 - delete_option( $woo_additional_terms_page_id );
27 - delete_option( $woo_additional_terms_notice );
28 - delete_option( $woo_additional_terms_error );
29 - // For site options in Multisite.
30 - delete_site_option( $woo_additional_terms_page_id );
31 - delete_site_option( $woo_additional_terms_notice );
32 - delete_site_option( $woo_additional_terms_error );
33 -}
15 +delete_option( '_woo_additional_terms_page_id' );
16 +delete_option( '_woo_additional_terms_notice' );
17 +delete_option( '_woo_additional_terms_error' );
18 +// For site options in Multisite.
19 +delete_site_option( '_woo_additional_terms_page_id' );
20 +delete_site_option( '_woo_additional_terms_notice' );
21 +delete_site_option( '_woo_additional_terms_error' );