Skip to content

Commit

Permalink
rename getPlanSlugForFirstPartyThemes since it works for more now
Browse files Browse the repository at this point in the history
  • Loading branch information
Addison-Stavlo committed Sep 13, 2024
1 parent 65abce4 commit a4175d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/my-sites/themes/theme-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import { getSelectedSiteId } from 'calypso/state/ui/selectors';
* @param {string} minimumPlan
* @returns
*/
function getPlanPathSlugForFirstPartyThemes( state, siteId, minimumPlan ) {
function getPlanSlugForThemes( state, siteId, minimumPlan ) {
const currentPlanSlug = getSitePlanSlug( state, siteId );
const requiredTerm = getPlan( currentPlanSlug )?.term || TERM_ANNUALLY;
const requiredPlanSlug = findFirstSimilarPlanKey( minimumPlan, { term: requiredTerm } );
Expand Down Expand Up @@ -101,7 +101,7 @@ function getAllThemeOptions( { translate, isFSEActive } ) {
? PLAN_PREMIUM
: tierMinimumUpsellPlan;

const planPathSlug = getPlanPathSlugForFirstPartyThemes( state, siteId, minimumPlan );
const planPathSlug = getPlanSlugForThemes( state, siteId, minimumPlan );

return `/checkout/${ slug }/${ planPathSlug }?redirect_to=${ redirectTo }`;
},
Expand Down Expand Up @@ -189,7 +189,7 @@ function getAllThemeOptions( { translate, isFSEActive } ) {
} )
);

const planPathSlug = getPlanPathSlugForFirstPartyThemes( state, siteId, PLAN_BUSINESS );
const planPathSlug = getPlanSlugForThemes( state, siteId, PLAN_BUSINESS );

return `/checkout/${ slug }/${ planPathSlug }?redirect_to=${ redirectTo }`;
},
Expand Down Expand Up @@ -225,7 +225,7 @@ function getAllThemeOptions( { translate, isFSEActive } ) {
`${ origin }/marketplace/theme/${ themeId }/install/${ slug }`
);

const planPathSlug = getPlanPathSlugForFirstPartyThemes( state, siteId, PLAN_BUSINESS );
const planPathSlug = getPlanSlugForThemes( state, siteId, PLAN_BUSINESS );

return `/checkout/${ slug }/${ planPathSlug }?redirect_to=${ redirectTo }`;
},
Expand Down

0 comments on commit a4175d1

Please sign in to comment.