Proposed Changes
This PR adjusts the “Premium themes” feature in the Plans grid so it can surface that the Starter plans has access to some premium themes (once we launch the Theme Tiers project, see paYJgx-4kX-p2).
The approach taken here relies on the proposal that @niranjan-uma-shankar made in paYJgx-4vW-p2#comment-4600, in which the Starter plan has access to “Dozens of premium themes” and the Explorer plan and above has access to “Unlimited premium themes”.
It’s my understanding that @Automattic/martech wants to be very careful about the features we display in the Plans grid, so this PR doesn’t change the Starter plan in the general view. It only changes the table that’s visible after clicking on the “Compare plans” button:
Before |
After |
|
|
It also slightly changes the feature name for the Explorer plan to better reflect that all premium themes can be accessed with that plan:
Before |
After |
|
|
From a technical standpoint, this PR also consolidates all the different constants used for the premium themes feature so it’s easier to maintain them:
WPCOM_FEATURES_PREMIUM_THEMES
has been renamed to WPCOM_FEATURES_PREMIUM_THEMES_UNLIMITED
so it’s clear that this feature has access to all the premium themes.
FEATURE_PERSONAL_THEMES
has been renamed to WPCOM_FEATURES_PREMIUM_THEMES_LIMITED
so it’s clear that this feature is synced with class-wpcom-features.php
(hence the WPCOM_FEATURES_
prefix) and it’s the one that has access to some premium themes.
FEATURE_PREMIUM_THEMES_V2
has been removed, and all its usages have been replaced with WPCOM_FEATURES_PREMIUM_THEMES_UNLIMITED
.
FEATURE_PREMIUM_THEMES
now indicates the general feature that it’s used in the comparison table, so all previous usages have been replaced with WPCOM_FEATURES_PREMIUM_THEMES_UNLIMITED
.
Testing Instructions
- Use the Calypso live link below.
- Go to Upgrades > Plans.
- Check the Explorer plan in the general view.
- Make sure it has a “Unlimited premium plans” feature.
- Add the
?flags=theme/tiers
query param to the URL and reload the page.
- Scroll down and click on the “Compare plans” button.
- Scroll down until you see the “Premium themes” feature in the comparison view.
- Make sure the column for the Starter plan says “Dozens of premium themes”.
- Make sure the column for Explorer and above says “Unlimited premium themes”.
- Replace the query param with
?flags=-theme/tiers
and reload the page.
- Scroll down and click on the “Compare plans” button.
- Scroll down until you see the “Premium themes” feature in the comparison view.
- Make sure the column for the Starter plan says “-” now.
Unfortunately, no screenshots were provided by the developer.