Skip to content

Commit

Permalink
Settings: Renaming const and its value
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz-cp committed Sep 30, 2024
1 parent 3f7dbd1 commit 50378a0
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
FEATURE_SPAM_AKISMET_PLUS,
FEATURE_SEARCH_JETPACK,
FEATURE_SIMPLE_PAYMENTS_JETPACK,
FEATURE_EMAIL_SUBSCRIPTION_JETPACK,
FEATURE_NEWSLETTER_JETPACK,
getJetpackProductUpsellByFeature,
} from 'lib/plans/constants';
import { get, includes } from 'lodash';
Expand Down Expand Up @@ -324,7 +324,7 @@ export const SettingsCard = inprops => {
/>
);

case FEATURE_EMAIL_SUBSCRIPTION_JETPACK:
case FEATURE_NEWSLETTER_JETPACK:
if ( props.hasConnectedOwner ) {
return '';
}
Expand All @@ -333,7 +333,7 @@ export const SettingsCard = inprops => {
<JetpackBanner
title={ __( 'Connect your WordPress.com account to enable newsletters.', 'jetpack' ) }
callToAction={ connectLabel() }
plan={ getJetpackProductUpsellByFeature( FEATURE_EMAIL_SUBSCRIPTION_JETPACK ) }
plan={ getJetpackProductUpsellByFeature( FEATURE_NEWSLETTER_JETPACK ) }
feature={ feature }
onClick={ handleConnectClick( feature ) }
rna
Expand Down
4 changes: 2 additions & 2 deletions projects/plugins/jetpack/_inc/client/lib/plans/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ export const FEATURE_JETPACK_AI = 'ai-jetpack';
export const FEATURE_JETPACK_CRM = 'crm-jetpack';
export const FEATURE_JETPACK_BOOST = 'boost-jetpack';
export const FEATURE_SIMPLE_PAYMENTS_JETPACK = 'simple-payments-jetpack';
export const FEATURE_EMAIL_SUBSCRIPTION_JETPACK = 'email-subscription';
export const FEATURE_NEWSLETTER_JETPACK = 'newsletter-jetpack';

// Upsells
export const JETPACK_FEATURE_PRODUCT_UPSELL_MAP = {
Expand All @@ -417,7 +417,7 @@ export const JETPACK_FEATURE_PRODUCT_UPSELL_MAP = {
[ FEATURE_SIMPLE_PAYMENTS_JETPACK ]: PLAN_JETPACK_SECURITY_T1_YEARLY,
[ FEATURE_JETPACK_AI ]: PLAN_JETPACK_AI_YEARLY,
[ FEATURE_JETPACK_BOOST ]: PLAN_JETPACK_BOOST,
[ FEATURE_EMAIL_SUBSCRIPTION_JETPACK ]: PLAN_JETPACK_CREATOR_YEARLY,
[ FEATURE_NEWSLETTER_JETPACK ]: PLAN_JETPACK_CREATOR_YEARLY,
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import SettingsGroup from 'components/settings-group';
import SupportInfo from 'components/support-info';
import TextInput from 'components/text-input';
import analytics from 'lib/analytics';
import { FEATURE_EMAIL_SUBSCRIPTION_JETPACK } from 'lib/plans/constants';
import { FEATURE_NEWSLETTER_JETPACK } from 'lib/plans/constants';
import { useCallback, useState } from 'react';
import { connect } from 'react-redux';
import { isUnavailableInOfflineMode, isUnavailableInSiteConnectionMode } from 'state/connection';
Expand Down Expand Up @@ -180,7 +180,7 @@ const EmailSettings = props => {
{ ...props }
header={ __( 'Email configuration', 'jetpack' ) }
hideButton
feature={ FEATURE_EMAIL_SUBSCRIPTION_JETPACK }
feature={ FEATURE_NEWSLETTER_JETPACK }
module={ SUBSCRIPTIONS_MODULE_NAME }
saveDisabled={ disabled }
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FormLabel } from 'components/forms';
import { withModuleSettingsFormHelpers } from 'components/module-settings/with-module-settings-form-helpers';
import SettingsCard from 'components/settings-card';
import SettingsGroup from 'components/settings-group';
import { FEATURE_EMAIL_SUBSCRIPTION_JETPACK } from 'lib/plans/constants';
import { FEATURE_NEWSLETTER_JETPACK } from 'lib/plans/constants';
import React, { useCallback } from 'react';
import { connect } from 'react-redux';
import { isUnavailableInOfflineMode, isUnavailableInSiteConnectionMode } from 'state/connection';
Expand Down Expand Up @@ -44,7 +44,7 @@ const MessagesSetting = props => {
<SettingsCard
{ ...props }
header={ __( 'Messages', 'jetpack' ) }
feature={ FEATURE_EMAIL_SUBSCRIPTION_JETPACK }
feature={ FEATURE_NEWSLETTER_JETPACK }
module={ SUBSCRIPTIONS_MODULE_NAME }
saveDisabled={ disabled }
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { __ } from '@wordpress/i18n';
import clsx from 'clsx';
import SettingsCard from 'components/settings-card';
import SettingsGroup from 'components/settings-group';
import { FEATURE_EMAIL_SUBSCRIPTION_JETPACK } from 'lib/plans/constants';
import { FEATURE_NEWSLETTER_JETPACK } from 'lib/plans/constants';
import React, { useCallback, useMemo } from 'react';
import { connect } from 'react-redux';
import {
Expand Down Expand Up @@ -92,7 +92,7 @@ function NewsletterCategories( props ) {
<SettingsCard
{ ...props }
header={ __( 'Newsletter categories', 'jetpack' ) }
feature={ FEATURE_EMAIL_SUBSCRIPTION_JETPACK }
feature={ FEATURE_NEWSLETTER_JETPACK }
module={ SUBSCRIPTIONS_MODULE_NAME }
saveDisabled={ disabled }
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ModuleToggle } from 'components/module-toggle';
import SettingsCard from 'components/settings-card';
import SettingsGroup from 'components/settings-group';
import analytics from 'lib/analytics';
import { FEATURE_EMAIL_SUBSCRIPTION_JETPACK } from 'lib/plans/constants';
import { FEATURE_NEWSLETTER_JETPACK } from 'lib/plans/constants';
import React from 'react';
import { connect } from 'react-redux';
import { isCurrentUserLinked, isUnavailableInOfflineMode, isOfflineMode } from 'state/connection';
Expand Down Expand Up @@ -61,7 +61,7 @@ function Newsletter( props ) {
{ ...props }
header={ __( 'Newsletter', 'jetpack' ) }
hideButton
feature={ FEATURE_EMAIL_SUBSCRIPTION_JETPACK }
feature={ FEATURE_NEWSLETTER_JETPACK }
module={ SUBSCRIPTIONS_MODULE_NAME }
>
<SettingsGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { withModuleSettingsFormHelpers } from 'components/module-settings/with-m
import SettingsCard from 'components/settings-card';
import SettingsGroup from 'components/settings-group';
import analytics from 'lib/analytics';
import { FEATURE_EMAIL_SUBSCRIPTION_JETPACK } from 'lib/plans/constants';
import { FEATURE_NEWSLETTER_JETPACK } from 'lib/plans/constants';
import React, { useCallback } from 'react';
import { connect } from 'react-redux';
import { isOfflineMode } from 'state/connection';
Expand Down Expand Up @@ -32,7 +32,7 @@ function PaidNewsletter( props ) {
{ ...props }
header={ __( 'Paid Newsletter', 'jetpack' ) }
hideButton
feature={ FEATURE_EMAIL_SUBSCRIPTION_JETPACK }
feature={ FEATURE_NEWSLETTER_JETPACK }
>
<SettingsGroup
disableInOfflineMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { FormLegend, FormFieldset } from 'components/forms';
import { withModuleSettingsFormHelpers } from 'components/module-settings/with-module-settings-form-helpers';
import SettingsCard from 'components/settings-card';
import SettingsGroup from 'components/settings-group';
import { FEATURE_EMAIL_SUBSCRIPTION_JETPACK } from 'lib/plans/constants';
import { FEATURE_NEWSLETTER_JETPACK } from 'lib/plans/constants';
import React, { useCallback } from 'react';
import { connect } from 'react-redux';
import { isCurrentUserLinked, isUnavailableInOfflineMode, isOfflineMode } from 'state/connection';
Expand Down Expand Up @@ -120,7 +120,7 @@ function SubscriptionsSettings( props ) {
<SettingsCard
{ ...props }
hideButton
feature={ FEATURE_EMAIL_SUBSCRIPTION_JETPACK }
feature={ FEATURE_NEWSLETTER_JETPACK }
module={ SUBSCRIPTIONS_MODULE_NAME }
header={ __( 'Subscriptions', 'jetpack' ) }
>
Expand Down

0 comments on commit 50378a0

Please sign in to comment.