diff --git a/src/Admin/Actions.php b/src/Admin/Actions.php index b5b44313..00a0fd91 100644 --- a/src/Admin/Actions.php +++ b/src/Admin/Actions.php @@ -80,7 +80,7 @@ public function maybe_redirect_to_wizard() { if ( ! $wizard_done ) { $url = admin_url( 'options-general.php?page=plausible_analytics#welcome_slide' ); - wp_redirect( $url ); + wp_safe_redirect( $url ); exit; } diff --git a/src/Ajax.php b/src/Ajax.php index 2f05eea0..b29108da 100644 --- a/src/Ajax.php +++ b/src/Ajax.php @@ -159,7 +159,7 @@ private function maybe_handle_redirect( $direction ) { $url .= '#' . $direction; } - wp_redirect( $url ); + wp_safe_redirect( $url ); exit; }