blob: dafa70e9d339c09dcd04e17a2bdb10c5f918a279 [file] [log] [blame]
swissChilif0cbdc32023-01-05 17:21:38 -05001<?php
2if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly.
4}
5
6// if uninstall not called from WordPress exit.
7if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
8 exit;
9}
10
11/*
12 * Only remove ALL product and page data if WC_REMOVE_ALL_DATA constant is set to true in user's
13 * wp-config.php. This is to prevent data loss when deleting the plugin from the backend
14 * and to ensure only the site owner can perform this action.
15 */
16if ( defined( 'WC_REMOVE_ALL_DATA' ) && true === WC_REMOVE_ALL_DATA ) {
17 // Delete options.
18 delete_option( 'woocommerce_stripe_settings' );
19 delete_option( 'wc_stripe_show_styles_notice' );
20 delete_option( 'wc_stripe_show_request_api_notice' );
21 delete_option( 'wc_stripe_show_apple_pay_notice' );
22 delete_option( 'wc_stripe_show_ssl_notice' );
23 delete_option( 'wc_stripe_show_keys_notice' );
24 delete_option( 'wc_stripe_show_alipay_notice' );
25 delete_option( 'wc_stripe_show_bancontact_notice' );
26 delete_option( 'wc_stripe_show_bitcoin_notice' );
27 delete_option( 'wc_stripe_show_eps_notice' );
28 delete_option( 'wc_stripe_show_giropay_notice' );
29 delete_option( 'wc_stripe_show_ideal_notice' );
30 delete_option( 'wc_stripe_show_multibanco_notice' );
31 delete_option( 'wc_stripe_show_p24_notice' );
32 delete_option( 'wc_stripe_show_sepa_notice' );
33 delete_option( 'wc_stripe_show_sofort_notice' );
34 delete_option( 'wc_stripe_version' );
35 delete_option( 'woocommerce_stripe_bancontact_settings' );
36 delete_option( 'woocommerce_stripe_alipay_settings' );
37 delete_option( 'woocommerce_stripe_bitcoin_settings' );
38 delete_option( 'woocommerce_stripe_ideal_settings' );
39 delete_option( 'woocommerce_stripe_p24_settings' );
40 delete_option( 'woocommerce_stripe_giropay_settings' );
41 delete_option( 'woocommerce_stripe_sepa_settings' );
42 delete_option( 'woocommerce_stripe_sofort_settings' );
43}