Rename the import screen displayed flag so it doesn't clash with WC settings [MAILPOET-1983]
This commit is contained in:
@@ -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);
|
||||
|
@@ -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')
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user