From 93bc91b244445edc61ad919383e0429960e4a09b Mon Sep 17 00:00:00 2001 From: Dan0sz <18595395+Dan0sz@users.noreply.github.com> Date: Wed, 8 May 2024 11:02:32 +0200 Subject: [PATCH 1/2] Improved: make sure self-hosters are never redirected to the configuration wizard. --- src/Admin/Actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Admin/Actions.php b/src/Admin/Actions.php index cf6384a4..58d83e2b 100644 --- a/src/Admin/Actions.php +++ b/src/Admin/Actions.php @@ -70,7 +70,7 @@ public function maybe_redirect_to_wizard() { return; } - $wizard_done = get_option( 'plausible_analytics_wizard_done', false ); + $wizard_done = get_option( 'plausible_analytics_wizard_done', false ) || ! empty( Helpers::get_settings()[ 'self_hosted_domain' ] ); if ( ! $wizard_done ) { $url = admin_url( 'options-general.php?page=plausible_analytics#welcome_slide' ); From 421fb2532fbeebb5bf2781a6ce489f588713b77e Mon Sep 17 00:00:00 2001 From: Dan0sz <18595395+Dan0sz@users.noreply.github.com> Date: Wed, 8 May 2024 11:05:59 +0200 Subject: [PATCH 2/2] PHPDoc. --- src/Admin/Actions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Admin/Actions.php b/src/Admin/Actions.php index 58d83e2b..79f7c0de 100644 --- a/src/Admin/Actions.php +++ b/src/Admin/Actions.php @@ -70,6 +70,7 @@ public function maybe_redirect_to_wizard() { return; } + // Self-hosters should never be redirected to the settings screen, because the wizard isn't shown to them. $wizard_done = get_option( 'plausible_analytics_wizard_done', false ) || ! empty( Helpers::get_settings()[ 'self_hosted_domain' ] ); if ( ! $wizard_done ) {