Skip to content

Commit

Permalink
Emails: Automatically move to the top and expand the Google Workspace…
Browse files Browse the repository at this point in the history
… when there is a Google Sale (Automattic#66816)
  • Loading branch information
AllTerrainDeveloper authored Aug 22, 2022
1 parent 0e1c763 commit eadaafa
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,10 @@ const EmailProvidersStackedComparison = ( {
const isGSuiteSupported =
domain && canPurchaseGSuite && ( isDomainInCart || hasGSuiteSupportedDomain( [ domain ] ) );

const shouldPromoteGoogleWorkspace = isGSuiteSupported && source === 'google-sale';
const shouldPromoteGoogleWorkspace = isGSuiteSupported && hasDiscount( gSuiteProduct );

const [ detailsExpanded, setDetailsExpanded ] = useState( () => {
const hasDiscountForGSuite = hasDiscount( gSuiteProduct );

if ( shouldPromoteGoogleWorkspace && ! selectedEmailProviderSlug && hasDiscountForGSuite ) {
if ( shouldPromoteGoogleWorkspace && ! selectedEmailProviderSlug ) {
return {
google: true,
titan: false,
Expand Down

0 comments on commit eadaafa

Please sign in to comment.