WPCOM_Features: add PODCASTING feature and Premium-and-higher plan mapping#48700
WPCOM_Features: add PODCASTING feature and Premium-and-higher plan mapping#48700robertbpugh wants to merge 1 commit into
Conversation
…pping Maps the new podcasting feature to WPCOM_PREMIUM_AND_HIGHER_PLANS plus JETPACK_ALL_SITES so Current_Plan::supports( 'podcasting' ) and downstream podcast surface gates can resolve product access from a single source.
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Wpcomsh plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
There was a problem hiding this comment.
Pull request overview
Adds a new WPCOM_Features slug for podcasting and wires it into the wpcomsh feature-to-plan mapping so podcast-related gating can rely on a single feature identifier across surfaces.
Changes:
- Introduce
WPCOM_Features::PODCASTING = 'podcasting'. - Map
PODCASTINGaccess toWPCOM_PREMIUM_AND_HIGHER_PLANSplusJETPACK_ALL_SITES. - Add a wpcomsh changelog entry documenting the new feature mapping.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| projects/plugins/wpcomsh/wpcom-features/class-wpcom-features.php | Adds the PODCASTING feature constant and maps it to Premium-and-higher plans and all Jetpack sites. |
| projects/plugins/wpcomsh/changelog/pods-142-podcasting-feature | Adds a changelog entry for the new PODCASTING feature mapping. |
| self::PODCASTING => array( | ||
| self::WPCOM_PREMIUM_AND_HIGHER_PLANS, | ||
| self::JETPACK_ALL_SITES, | ||
| ), |
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
Updated the PR/testing notes to use the correct APIs (wpcom_site_has_feature( WPCOM_Features::PODCASTING ) / WPCOM_Features::has_feature(...)) instead of WPCOM_Features::supports(...). No code changes were required for this feedback; current head is 578dd1f.
|
@copilot apply changes based on the comments in this thread |
I checked the linked review thread and applied the actionable feedback: use |
Proposed changes
WPCOM_Features::PODCASTING = 'podcasting'soPodcast_Gate(PODS-141) and any future surface gate resolve product access through one slug.WPCOM_PREMIUM_AND_HIGHER_PLANSplusJETPACK_ALL_SITES, which covers Premium, Pro, Business (including Hundred-Year), Ecommerce, Ecommerce Trial, and WooExpress. The two extras from the issue body fold into this rollup:WPCOM_ECOMMERCE_PLANSalready lives under Business-and-higher, andWPCOM_100_YEAR_PLANSis not a constant in this file since Hundred-Year nests insideWPCOM_BUSINESS_PLANS.The file is mirrored verbatim into wpcom. A paired wpcom PR has to deploy alongside this one before any podcast surface gate ships.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
php -l projects/plugins/wpcomsh/wpcom-features/class-wpcom-features.phppasses locally.WPCOM_Features::supports( WPCOM_Features::PODCASTING, $blog_id )returnstrueon a Premium-or-higher blog andfalseon Free or Personal (without thepodcasting-grandfatheredsticker, which is wired in PODS-141).