Skip to content

Commit f3898b4

Browse files
committed
reload the page after the license is saved
1 parent f92351c commit f3898b4

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

assets/js/onboard.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
const progressPlannerSaveLicenseKey = ( licenseKey ) => {
1616
console.log( 'License key: ' + licenseKey );
17-
progressPlannerAjaxRequest( {
17+
return progressPlannerAjaxRequest( {
1818
url: progressPlanner.ajaxUrl,
1919
data: {
2020
action: 'progress_planner_save_onboard_data',
@@ -47,7 +47,10 @@ const progressPlannerAjaxAPIRequest = ( data ) => {
4747
'none';
4848

4949
// Make a local request to save the response data.
50-
progressPlannerSaveLicenseKey( response.license_key );
50+
progressPlannerSaveLicenseKey( response.license_key ).then( () => {
51+
// Refresh the page.
52+
window.location.reload();
53+
} );
5154
} )
5255
.catch( ( error ) => {
5356
console.warn( error );

0 commit comments

Comments
 (0)