File size: 403 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import 'calypso/state/ui/init';

/**
 * Retrieve the "intent" that the client implied prior to upgrading so we can send them to the appropriate route after checkout
 * @param {Object} state  Global state tree
 * @returns {string} The intent signaled by the customer for upgrade purposes
 */
export default function getCheckoutUpgradeIntent( state ) {
	return state?.ui?.checkout?.upgradeIntent || '';
}