| 1 |
<?php |
| 2 |
|
| 3 |
defined( 'ABSPATH' ) || exit; |
| 4 |
|
| 5 |
// if uninstall not called from WordPress exit |
| 6 |
defined( 'WP_UNINSTALL_PLUGIN' ) || exit; |
| 7 |
|
| 8 |
/* |
| 9 |
* Only remove ALL product and page data if WC_REMOVE_ALL_DATA constant is set to true in user's |
| 10 |
* wp-config.php. This is to prevent data loss when deleting the plugin from the backend |
| 11 |
* and to ensure only the site owner can perform this action. |
| 12 |
*/ |
| 13 |
if ( defined( 'WC_REMOVE_ALL_DATA' ) && true === WC_REMOVE_ALL_DATA ) { |
| 14 |
global $wpdb; |
| 15 |
|
| 16 |
// Delete options. |
| 17 |
delete_option('woocommerce_vipps_recurring_settings'); |
| 18 |
|
| 19 |
$wpdb->query( 'DELETE FROM wp_options WHERE option_name LIKE "vipps_recurring_dismissed_%";' ); |
| 20 |
} |
| 21 |
|