diff --git a/assets/js/src/intro.jsx b/assets/js/src/intro.jsx index 36041f7d1f..b485a2d118 100644 --- a/assets/js/src/intro.jsx +++ b/assets/js/src/intro.jsx @@ -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(); } diff --git a/lib/Config/Changelog.php b/lib/Config/Changelog.php index f5f7f14f37..f9686a88e0 100644 --- a/lib/Config/Changelog.php +++ b/lib/Config/Changelog.php @@ -47,6 +47,7 @@ class Changelog { } else { $skip_wizard = WPHooks::applyFilters('mailpoet_skip_welcome_wizard', false); $redirect_url = $skip_wizard ? null : admin_url('admin.php?page=mailpoet-welcome-wizard'); + Setting::setValue('show_intro', true); } } } diff --git a/views/newsletters.html b/views/newsletters.html index b9016d0f3f..fc419c5598 100644 --- a/views/newsletters.html +++ b/views/newsletters.html @@ -305,6 +305,7 @@ <% endblock %> <% block after_javascript %> +<% if settings.show_intro %> +<% endif %> <% endblock %>