Skip to content

Commit 3657119

Browse files
committed
improve upgrade tasks check for fresh installs, covers branded sites
1 parent d23535b commit 3657119

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

classes/class-plugin-upgrade-tasks.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ public function handle_activation_or_upgrade() {
8383
* @return void
8484
*/
8585
protected function add_initial_onboarding_tasks() {
86-
// Privacy policy is not accepted, so it's a fresh install.
87-
$fresh_install = ! \progress_planner()->is_privacy_policy_accepted();
86+
// Check if this is a fresh install (not a re-activation).
87+
// If the option doesn't exist, it's a fresh install.
88+
$fresh_install = false === \get_option( 'progress_planner_previous_version_task_providers', false );
8889

8990
// If this is the first time the plugin is installed, save the task providers.
9091
if ( $fresh_install ) {

0 commit comments

Comments
 (0)