Skip to content

Commit

Permalink
wip: Localize migration onboarding data
Browse files Browse the repository at this point in the history
  • Loading branch information
kjohnson committed Aug 23, 2023
1 parent 151e87b commit 4610870
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/FormBuilder/Routes/RegisterFormBuilderPageRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ public function renderPage()
'autoStartTour' => !get_user_meta(get_current_user_id(), 'givewp-form-builder-tour-completed', true),
]);

$migratedFormId = give_get_meta($donationFormId, 'migratedFormId', true);
wp_localize_script('@givewp/form-builder/script', 'migrationOnboardingData', [
'isMigratedForm' => (bool) $migratedFormId,
'showMigrationOnboarding' => (bool) $migratedFormId && !get_user_meta(get_current_user_id(), 'givewp-form-builder-migration-onboarding-completed', true)
]);

View::render('FormBuilder.admin-form-builder');
}

Expand Down

0 comments on commit 4610870

Please sign in to comment.