File size: 444 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import { getCurrentUser } from 'calypso/state/current-user/selectors';

/**
 * Determines whether G Suite can be purchased by the user based on their country.
 * @param {Object} state Global state tree
 * @returns {boolean} true if the user is allowed to purchase G Suite, false otherwise
 */
export default function canUserPurchaseGSuite( state ) {
	const user = getCurrentUser( state );
	return user?.is_valid_google_apps_country ?? false;
}