Skip to content

Commit 62d7024

Browse files
committed
Remove the upload themes upsell banner on Atomic
1 parent 8f92067 commit 62d7024

File tree

1 file changed

+8
-40
lines changed

1 file changed

+8
-40
lines changed

client/my-sites/themes/single-site-jetpack.jsx

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import {
22
FEATURE_UPLOAD_THEMES,
3-
PLAN_BUSINESS,
43
PLAN_ECOMMERCE,
54
PLAN_ECOMMERCE_TRIAL_MONTHLY,
6-
getPlan,
75
} from '@automattic/calypso-products';
86
import { connect } from 'react-redux';
97
import UpsellNudge from 'calypso/blocks/upsell-nudge';
@@ -33,57 +31,27 @@ const ConnectedSingleSiteJetpack = connectOptions( ( props ) => {
3331
} = props;
3432

3533
const isWooExpressTrial = PLAN_ECOMMERCE_TRIAL_MONTHLY === currentPlan?.productSlug;
34+
const displayUpsellBanner = isAtomic && ! requestingSitePlans && isWooExpressTrial;
3635

3736
const upsellBanner = () => {
38-
if ( isWooExpressTrial ) {
39-
return (
40-
<UpsellNudge
41-
className="themes__showcase-banner"
42-
event="calypso_themes_list_install_themes"
43-
feature={ FEATURE_UPLOAD_THEMES }
44-
title={ translate( 'Upgrade to a plan to upload your own themes!' ) }
45-
callToAction={ translate( 'Upgrade now' ) }
46-
showIcon
47-
/>
48-
);
49-
}
50-
51-
return (
37+
return displayUpsellBanner ? (
5238
<UpsellNudge
5339
className="themes__showcase-banner"
5440
event="calypso_themes_list_install_themes"
5541
feature={ FEATURE_UPLOAD_THEMES }
56-
plan={ PLAN_BUSINESS }
57-
title={
58-
/* translators: %(planName1)s and %(planName2)s are the short-hand version of the Business and Commerce plan names */
59-
translate(
60-
'Unlock ALL premium themes and upload your own themes with our %(planName1)s and %(planName2)s plans!',
61-
{
62-
args: {
63-
planName1: getPlan( PLAN_BUSINESS )?.getTitle() ?? '',
64-
planName2: getPlan( PLAN_ECOMMERCE )?.getTitle() ?? '',
65-
},
66-
}
67-
)
68-
}
42+
title={ translate( 'Upgrade to a plan to upload your own themes!' ) }
6943
callToAction={ translate( 'Upgrade now' ) }
7044
showIcon
7145
/>
72-
);
46+
) : null;
7347
};
7448

7549
const upsellUrl = () => {
76-
if ( isWooExpressTrial ) {
77-
return `/plans/${ siteId }?feature=${ FEATURE_UPLOAD_THEMES }&plan=${ PLAN_ECOMMERCE }`;
78-
}
79-
80-
return (
81-
isAtomic && `/plans/${ siteId }?feature=${ FEATURE_UPLOAD_THEMES }&plan=${ PLAN_BUSINESS }`
82-
);
50+
return isWooExpressTrial
51+
? `/plans/${ siteId }?feature=${ FEATURE_UPLOAD_THEMES }&plan=${ PLAN_ECOMMERCE }`
52+
: null;
8353
};
8454

85-
const displayUpsellBanner = isAtomic && ! requestingSitePlans && currentPlan;
86-
8755
useRequestSiteChecklistTaskUpdate( siteId, CHECKLIST_KNOWN_TASKS.THEMES_BROWSED );
8856

8957
return (
@@ -98,7 +66,7 @@ const ConnectedSingleSiteJetpack = connectOptions( ( props ) => {
9866
upsellUrl={ upsellUrl() }
9967
siteId={ siteId }
10068
isJetpackSite
101-
upsellBanner={ displayUpsellBanner ? upsellBanner() : null }
69+
upsellBanner={ upsellBanner() }
10270
/>
10371
</Main>
10472
);

0 commit comments

Comments
 (0)