Skip to content

Commit 0261be9

Browse files
author
Scott Anderson
committed
Merge branch 'sprint/21.06' into feature/cc-223-checkout-configuration
2 parents 2245f98 + 777a844 commit 0261be9

File tree

2 files changed

+37
-5
lines changed

2 files changed

+37
-5
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
/**

src/View/Admin/WooTab.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ class WooTab extends WC_Settings_Page implements Hookable {
7676
*/
7777
const EMAIL_FIELD = 'cc_woo_store_information_contact_email';
7878

79+
/**
80+
* Alternative Login URL.
81+
*
82+
* @since 2021-06-02
83+
*/
84+
const ALT_LOGIN_URL = 'cc_woo_store_information_alt_login_url';
85+
7986
/**
8087
* Store checkbox location.
8188
*
@@ -372,7 +379,13 @@ private function get_connection_established_options() {
372379
* @since 2019-03-21
373380
*/
374381
public function render_cta_button() {
375-
$url = 'https://login.constantcontact.com/login/?goto=https%3A%2F%2Fapp.constantcontact.com%2Fpages%2Fecomm%2Fdashboard%23woocommerce';
382+
383+
$url = get_option( self::ALT_LOGIN_URL, '' );
384+
385+
if ( '' === $url ) {
386+
$url = 'https://login.constantcontact.com/login/?goto=https%3A%2F%2Fapp.constantcontact.com%2Fpages%2Fecomm%2Fdashboard%23woocommerce';
387+
}
388+
376389
?>
377390
<a
378391
class="button button-primary"
@@ -481,6 +494,12 @@ private function get_store_information_settings() {
481494
'true' => esc_html__( 'Yes - check this box by default', 'cc-woo' ),
482495
],
483496
],
497+
[
498+
'title' => esc_html__( 'Alternative Login Url', 'cc-woo' ),
499+
'desc' => esc_html__( 'Only use if directed to by Pro Support.', 'cc-woo' ),
500+
'id' => self::ALT_LOGIN_URL,
501+
'type' => 'text',
502+
],
484503
[
485504
'title' => esc_html__( 'Checkbox Filter Location', 'cc-woo' ),
486505
'desc' => esc_html__( 'Change filter location where checkbox is rendered.', 'cc-woo' ),

0 commit comments

Comments
 (0)