react-code-dataset / wp-calypso /client /state /selectors /get-checkout-upgrade-intent.js
Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
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 || '';
}