Skip to content

Commit 6517a3b

Browse files
dereksmarteliorivero
authored andcommitted
Plans page: Fix missing premium theme CTA on Pro plan (#7472)
1 parent 3ba94b2 commit 6517a3b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

_inc/client/plans/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
getPlanClass,
88
FEATURE_UNLIMITED_PREMIUM_THEMES
99
} from 'lib/plans/constants';
10+
import includes from 'lodash/includes';
1011

1112
/**
1213
* Internal dependencies
@@ -55,7 +56,7 @@ export const Plans = React.createClass( {
5556
}
5657

5758
const premiumThemesAvailable = 'undefined' !== typeof this.props.availableFeatures[ FEATURE_UNLIMITED_PREMIUM_THEMES ],
58-
premiumThemesActive = 'undefined' !== typeof this.props.activeFeatures[ FEATURE_UNLIMITED_PREMIUM_THEMES ],
59+
premiumThemesActive = includes( this.props.activeFeatures, FEATURE_UNLIMITED_PREMIUM_THEMES ),
5960
showThemesPromo = premiumThemesAvailable && ! premiumThemesActive;
6061

6162
if ( showThemesPromo ) {

_inc/client/plans/plan-body.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
getPlanClass,
1111
FEATURE_UNLIMITED_PREMIUM_THEMES
1212
} from 'lib/plans/constants';
13+
import includes from 'lodash/includes';
1314

1415
/**
1516
* Internal dependencies
@@ -71,7 +72,7 @@ const PlanBody = React.createClass( {
7172
const planClass = 'dev' !== this.props.plan
7273
? getPlanClass( this.props.plan )
7374
: 'dev';
74-
const premiumThemesActive = 'undefined' !== typeof this.props.activeFeatures[ FEATURE_UNLIMITED_PREMIUM_THEMES ];
75+
const premiumThemesActive = includes( this.props.activeFeatures, FEATURE_UNLIMITED_PREMIUM_THEMES );
7576

7677
switch ( planClass ) {
7778
case 'is-personal-plan':

0 commit comments

Comments
 (0)