Skip to content

Commit

Permalink
Merge pull request #323 from newfold-labs/release/1.11.1
Browse files Browse the repository at this point in the history
Bump Onboarding to 1.11.1
  • Loading branch information
officiallygod authored Sep 29, 2023
2 parents be6a011 + 6761831 commit 3f653d5
Show file tree
Hide file tree
Showing 43 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function nfd_wp_module_onboarding_register() {

// Set Global Constants
if ( ! defined( 'NFD_ONBOARDING_VERSION' ) ) {
define( 'NFD_ONBOARDING_VERSION', '1.11.0' );
define( 'NFD_ONBOARDING_VERSION', '1.11.1' );
}
if ( ! defined( 'NFD_ONBOARDING_DIR' ) ) {
define( 'NFD_ONBOARDING_DIR', __DIR__ );
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-preferences', 'wp-primitives', 'wp-style-engine', 'wp-url'), 'version' => 'f7c5419dad4a9f89da9f');
<?php return array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-preferences', 'wp-primitives', 'wp-style-engine', 'wp-url'), 'version' => '1a96ab4bf73f5b59efaa');
File renamed without changes.
8 changes: 4 additions & 4 deletions build/1.11.0/onboarding.js → build/1.11.1/onboarding.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@newfold-labs/wp-module-onboarding",
"version": "1.11.0",
"version": "1.11.1",
"description": "Next-generation WordPress Onboarding for WordPress sites at Newfold Digital.",
"license": "GPL-2.0-or-later",
"private": true,
Expand Down
9 changes: 7 additions & 2 deletions src/OnboardingSPA/components/StateHandlers/Flow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { ECOMMERCE_FLOW } from '../../../data/flows/constants';
import { getQueryParam, removeQueryParam } from '../../../utils';
import { commerce } from '../../../chapters/commerce';
import EcommerceStepLoader from '../../Loaders/Step/Ecommerce';
import { HiiveAnalytics } from '@newfold-labs/js-utility-ui-analytics';

const FlowStateHandler = ( { children } ) => {
const location = useLocation();
Expand Down Expand Up @@ -70,16 +71,20 @@ const FlowStateHandler = ( { children } ) => {
if ( retries >= MAX_RETRIES_FLOW_SWITCH ) {
return setNewFlow( false );
}
const response = switchFlow( flow );
const response = await switchFlow( flow );
if ( response?.error ) {
retries = retries + 1;
return handleCommerceFlow( flow, retries );
}
await HiiveAnalytics.dispatchEvents();

// TODO: Remove code below once Chapter Prioritization is enabled.
const firstEcommerceStep = commerce.steps[ 0 ];
const fragment = getFragment( window.location.href );
const redirect = removeQueryParam( window.location.href, 'flow' ).replace( fragment, '' );
const redirect = removeQueryParam(
window.location.href,
'flow'
).replace( fragment, '' );
window.location.replace( `${ redirect }#${ firstEcommerceStep.path }` );
window.location.reload();
};
Expand Down

0 comments on commit 3f653d5

Please sign in to comment.