Skip to content

Commit 777a844

Browse files
authored
Merge pull request #126 from WebDevStudios/feature/remove-options-on-deactivation
Feature/remove options on deactivation
2 parents a3ebfa1 + 82ee285 commit 777a844

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

src/Plugin.php

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,24 @@ public function do_deactivation_process() {
300300

301301
$this->clear_abandoned_checkouts_expiration_check();
302302

303-
if ( ! get_option( ConnectionStatus::CC_CONNECTION_ESTABLISHED_KEY ) ) {
304-
return;
305-
}
306-
303+
delete_option( CheckoutsTable::DB_VERSION_OPTION_NAME );
304+
delete_option( ConnectionStatus::CC_CONNECTION_USER_ID );
305+
delete_option( ConnectionStatus::CC_FIRST_CONNECTION );
307306
delete_option( ConnectionStatus::CC_CONNECTION_ESTABLISHED_KEY );
307+
308+
309+
// WooCommerce Options
310+
delete_option( 'cc_woo_store_information_first_name' );
311+
delete_option( 'cc_woo_store_information_last_name' );
312+
delete_option( 'cc_woo_store_information_phone_number' );
313+
delete_option( 'cc_woo_store_information_store_name' );
314+
delete_option( 'cc_woo_store_information_currency' );
315+
delete_option( 'cc_woo_store_information_currency' );
316+
delete_option( 'cc_woo_store_information_contact_email');
317+
delete_option( 'cc_woo_store_information_alt_login_url' );
318+
delete_option( 'constant_contact_for_woo_has_setup' );
319+
delete_option( 'cc_woo_customer_data_allow_import' );
320+
308321
}
309322

310323
/**

0 commit comments

Comments
 (0)