Skip to content

Commit

Permalink
Fix issue with undefined function data_get
Browse files Browse the repository at this point in the history
  • Loading branch information
wpscholar committed Feb 22, 2024
1 parent 54c5247 commit be77ae9
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 3 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"newfold-labs/wp-module-onboarding-data": "^1.1.0",
"newfold-labs/wp-module-patterns": "^0.1.14",
"newfold-labs/wp-module-install-checker": "^1.0",
"newfold-labs/wp-module-facebook": "^1.0.6"
"newfold-labs/wp-module-facebook": "^1.0.6",
"wp-forge/helpers": "^2.0"
},
"require-dev": {
"wp-phpunit/wp-phpunit": "^6.2",
Expand Down
142 changes: 141 additions & 1 deletion composer.lock

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

4 changes: 3 additions & 1 deletion includes/LoginRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

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;

/**
* Contains functionalities that redirect users to onboarding upon logging into WordPress.
Expand Down Expand Up @@ -65,7 +67,7 @@ public static function filter_redirect( $original_redirect, $user ) {

// Don't redirect to onboarding if onboarding was exited or completed.
$flow_data = get_option( Options::get_option_name( 'flow' ), false );
if ( data_get( $flow_data, 'hasExited' ) || data_get( $flow_data, 'isComplete' ) ) {
if ( dataGet( $flow_data, 'hasExited' ) || dataGet( $flow_data, 'isComplete' ) ) {
return $original_redirect;
}

Expand Down

0 comments on commit be77ae9

Please sign in to comment.