From 73b77710881c1e9a1c44a44eb84ac73361c52d96 Mon Sep 17 00:00:00 2001
From: Kevin Cristiano <kcristiano@kcristiano.com>
Date: Thu, 26 Sep 2019 22:23:24 -0400
Subject: [PATCH] redirect to setup page on activation

Signed-off-by: Kevin Cristiano <kcristiano@kcristiano.com>
---
 civicrm.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/civicrm.php b/civicrm.php
index dd1efef5b1..ac3b7cf7a8 100644
--- a/civicrm.php
+++ b/civicrm.php
@@ -291,6 +291,7 @@ class CiviCRM_For_WordPress {
 
     // Set a one-time-only option
     add_option( 'civicrm_activation_in_progress', 'true' );
+    add_option('civicrm_setup_do_activation_redirect', true);
 
   }
 
@@ -321,6 +322,11 @@ class CiviCRM_For_WordPress {
 
     // Change option so this action never fires again
     update_option( 'civicrm_activation_in_progress', 'false' );
+    if (!isset($_GET['activate-multi'])) {
+      wp_redirect(admin_url("options-general.php?page=civicrm-install"));
+      exit;
+    }
+    update_option('civicrm_setup_do_activation_redirect', 'false');
 
   }
 
-- 
GitLab