Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plan references in Marketing #64470

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/my-sites/marketing/tools/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const MarketingTools: FunctionComponent = () => {
<MarketingToolsFeature
title={ translate( 'Want to connect with your audience on Facebook and Instagram?' ) }
description={ translate(
'Discover an easy way to advertise your brand across Facebook and Instagram. Capture website actions to help you target audiences and measure results. {{em}}Available on Pro plan{{/em}}.',
'Discover an easy way to advertise your brand across Facebook and Instagram. Capture website actions to help you target audiences and measure results. {{em}}Available on Business and eCommerce plans{{/em}}.',
{
components: {
em: <em />,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
findFirstSimilarPlanKey,
TYPE_PRO,
TYPE_PREMIUM,
FEATURE_CLOUDFLARE_ANALYTICS,
FEATURE_GOOGLE_ANALYTICS,
} from '@automattic/calypso-products';
Expand Down Expand Up @@ -117,10 +117,10 @@ export function CloudflareAnalyticsSettings( {
const renderForm = () => {
const placeholderText = isRequestingSettings ? translate( 'Loading' ) : '';

const nudgeTitle = translate( 'Available with the Pro plan' );
const nudgeTitle = translate( 'Available with Premium plans or higher' );

const plan = findFirstSimilarPlanKey( site.plan.product_slug, {
type: TYPE_PRO,
type: TYPE_PREMIUM,
} );

const nudge = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const GoogleAnalyticsSimpleForm = ( {
} ) => {
const analyticsSupportUrl = localizeUrl( 'https://wordpress.com/support/google-analytics/' );
const nudgeTitle = translate(
'Connect your site to Google Analytics in seconds with the Pro plan'
'Connect your site to Google Analytics in seconds with the Premium plan'
);

useEffect( () => {
Expand Down
25 changes: 7 additions & 18 deletions client/my-sites/site-settings/seo-settings/form.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import {
isWpComAnnualPlan,
FEATURE_ADVANCED_SEO,
FEATURE_SEO_PREVIEW_TOOLS,
TYPE_BUSINESS,
TYPE_PRO,
findFirstSimilarPlanKey,
} from '@automattic/calypso-products';
import { Card, Button, FormInputValidation } from '@automattic/components';
Expand Down Expand Up @@ -247,32 +246,22 @@ export class SiteSettingsFormSEO extends Component {

const generalTabUrl = getGeneralTabUrl( slug );

// the Pro plan only has an annual term for now.
const upsellType =
selectedSite.plan && isWpComAnnualPlan( selectedSite.plan.product_slug )
? TYPE_PRO
: TYPE_BUSINESS;
const upsellTitle =
upsellType === TYPE_PRO
? translate(
'Boost your search engine ranking with the powerful SEO tools in the Pro plan'
)
: translate(
'Boost your search engine ranking with the powerful SEO tools in the Business plan'
);

const upsellProps =
siteIsJetpack && ! isAtomic
? {
title: translate( 'Boost your search engine ranking' ),
feature: FEATURE_SEO_PREVIEW_TOOLS,
href: `/checkout/${ slug }/${ PRODUCT_UPSELLS_BY_FEATURE[ FEATURE_ADVANCED_SEO ] }`,
}
: {
title: upsellTitle,
title: translate(
'Boost your search engine ranking with the powerful SEO tools in the Business plan'
),
feature: FEATURE_ADVANCED_SEO,
plan:
selectedSite.plan &&
findFirstSimilarPlanKey( selectedSite.plan.product_slug, {
type: upsellType,
type: TYPE_BUSINESS,
} ),
};

Expand Down
4 changes: 2 additions & 2 deletions client/my-sites/site-settings/seo-settings/test/form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
PLAN_PREMIUM_2_YEARS,
PLAN_PERSONAL,
PLAN_PERSONAL_2_YEARS,
PLAN_WPCOM_PRO,
PLAN_BUSINESS,
PLAN_JETPACK_FREE,
PLAN_JETPACK_PERSONAL,
PLAN_JETPACK_PERSONAL_MONTHLY,
Expand Down Expand Up @@ -159,7 +159,7 @@ describe( 'UpsellNudge should get appropriate plan constant', () => {
<SeoForm { ...props } siteIsJetpack={ false } selectedSite={ { plan: { product_slug } } } />
);
expect( comp.find( 'UpsellNudge' ) ).toHaveLength( 1 );
expect( comp.find( 'UpsellNudge' ).props().plan ).toBe( PLAN_WPCOM_PRO );
expect( comp.find( 'UpsellNudge' ).props().plan ).toBe( PLAN_BUSINESS );
} );
} );

Expand Down