From 20f3ce79e65ef49b61fa882683cdba59fae626a2 Mon Sep 17 00:00:00 2001 From: wxa Date: Mon, 6 May 2019 16:32:49 +0300 Subject: [PATCH] Rename the import screen displayed flag so it doesn't clash with WC settings [MAILPOET-1983] --- assets/js/src/wizard/woocommerce_import_controller.jsx | 2 +- lib/Config/Changelog.php | 2 +- tests/DataFactories/Settings.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/src/wizard/woocommerce_import_controller.jsx b/assets/js/src/wizard/woocommerce_import_controller.jsx index 7183589f94..b07f70b7d3 100644 --- a/assets/js/src/wizard/woocommerce_import_controller.jsx +++ b/assets/js/src/wizard/woocommerce_import_controller.jsx @@ -48,7 +48,7 @@ class WooCommerceImportController extends React.Component { submit(importType) { this.setState({ loading: true }); const settings = { - 'woocommerce.import_screen_displayed': 1, + woocommerce_import_screen_displayed: 1, 'mailpoet_subscribe_old_woocommerce_customers.enabled': importType === 'subscribed' ? 1 : 0, }; this.updateSettings(settings).then(this.scheduleImport).then(this.finishWizard); diff --git a/lib/Config/Changelog.php b/lib/Config/Changelog.php index a1eae7f38e..647af1c5b1 100644 --- a/lib/Config/Changelog.php +++ b/lib/Config/Changelog.php @@ -101,7 +101,7 @@ class Changelog { } if ( !in_array($_GET['page'], ['mailpoet-woocommerce-list-import', 'mailpoet-welcome-wizard', 'mailpoet-migration']) - && !$this->settings->get('woocommerce.import_screen_displayed') + && !$this->settings->get('woocommerce_import_screen_displayed') && $this->wooCommerceHelper->isWooCommerceActive() && $this->wooCommerceHelper->getOrdersCount() >= 1 && $this->wp->currentUserCan('administrator') diff --git a/tests/DataFactories/Settings.php b/tests/DataFactories/Settings.php index 1f71a29d71..8b17a35b65 100644 --- a/tests/DataFactories/Settings.php +++ b/tests/DataFactories/Settings.php @@ -96,7 +96,7 @@ class Settings { } function withWooCommerceListImportPageDisplayed($was_shown) { - $this->settings->set('woocommerce.import_screen_displayed', $was_shown ? 1 : 0); + $this->settings->set('woocommerce_import_screen_displayed', $was_shown ? 1 : 0); return $this; }