PluginProbe ʕ •ᴥ•ʔ
Remove Add to Cart Button for WooCommerce / 1.0.1
Remove Add to Cart Button for WooCommerce v1.0.1
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9
remove-add-to-cart-button-for-woocommerce / uninstall.php
remove-add-to-cart-button-for-woocommerce Last commit date
admin 5 years ago assets 5 years ago includes 5 years ago languages 5 years ago public 5 years ago LICENSE.txt 5 years ago README.txt 5 years ago index.php 5 years ago remove-add-to-cart-button-woocommerce.php 5 years ago uninstall.php 5 years ago
uninstall.php
43 lines
1 <?php
2
3 /**
4 * Fired when the plugin is uninstalled.
5 *
6 * When populating this file, consider the following flow
7 * of control:
8 *
9 * - This method should be static
10 * - Check if the $_REQUEST content actually is the plugin name
11 * - Run an admin referrer check to make sure it goes through authentication
12 * - Verify the output of $_GET makes sense
13 * - Repeat with other user roles. Best directly by using the links/query string parameters.
14 * - Repeat things for multisite. Once for a single site in the network, once sitewide.
15 *
16 * This file may be updated more in future version of the Boilerplate; however, this is the
17 * general skeleton and outline for how the file should work.
18 *
19 * For more information, see the following discussion:
20 * https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/pull/123#issuecomment-28541913
21 *
22 * @link https://wpartisan.net/
23 * @since 1.0.0
24 *
25 * @package Remove_Add_To_Cart_Button_Woocommerce
26 */
27
28 // If uninstall not called from WordPress, then exit.
29 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
30 exit;
31 }
32 $options = array(
33 'ratcw_login_reg_page_url',
34 'ratcw_login_reg_button_text',
35 );
36 foreach ( $options as $option_name ){
37 delete_option( $option_name );
38 }
39
40 global $current_user;
41 $user_id = $current_user->ID;
42
43 delete_user_meta( $user_id, 'ratcw_igne_noti' );