Show intro only on new install (but not when migrating from WP2)

Intro is marked as shown only when "Skip" or "Done" is explicitly used - this
avoids closing the intro by mistake and never having the option to see it again.

[MAILPOET-1446]
This commit is contained in:
Jan Jakeš
2018-08-04 23:14:53 +02:00
committed by pavel-mailpoet
parent 7ae25ae299
commit fcef5f0d2b
3 changed files with 15 additions and 0 deletions

View File

@ -54,6 +54,18 @@ function Intro() {
document.body.classList.remove('mailpoet-intro-active');
});
intro.onskip(() => {
// this is called also when "Done" button used
MailPoet.Ajax.post({
api_version: window.mailpoet_api_version,
endpoint: 'settings',
action: 'set',
data: {
show_intro: 0,
},
});
});
intro.start();
}