Skip to content

Commit

Permalink
Remove install checker, use onboarding-data function
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Apr 12, 2024
1 parent 7000edc commit 7bd5089
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 60 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"wp-cli/wp-config-transformer": "^1.3",
"newfold-labs/wp-module-onboarding-data": "^1.1",
"newfold-labs/wp-module-patterns": "^0.1",
"newfold-labs/wp-module-install-checker": "^1.0",
"newfold-labs/wp-module-facebook": "^1.0",
"wp-forge/helpers": "^2.0"
},
Expand Down
67 changes: 14 additions & 53 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions includes/LoginRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use NewfoldLabs\WP\Module\Onboarding\Data\Data;
use NewfoldLabs\WP\Module\Onboarding\Data\Options;

use function NewfoldLabs\WP\ModuleLoader\container;
use function WP_Forge\Helpers\dataGet;

/**
Expand Down Expand Up @@ -72,11 +71,8 @@ public static function filter_redirect( $original_redirect, $user ) {
}

// Don't redirect to onboarding if the site is not a fresh installation.
if ( container()->has( 'isFreshInstallation' ) ) {
$is_fresh_installation = container()->get( 'isFreshInstallation' );
if ( false === $is_fresh_installation ) {
return $original_redirect;
}
if ( false === Data::is_fresh_installation() ) {
return $original_redirect;
}

// Don't redirect to onboarding if the 'coming_soon' mode is off. The user has launched their site.
Expand Down

0 comments on commit 7bd5089

Please sign in to comment.