Skip to content

Commit d6baab6

Browse files
mmtrclaude
andauthored
wpcomsh: Mirror POSTS_TO_PODCAST tier features from wpcom (#48776)
* wpcomsh: Mirror POSTS_TO_PODCAST tier features from wpcom Mirrors the wpcom-side change (Automattic/wpcom#217049) that introduces plan-tiered monthly quotas for the Posts to Podcast endpoint: POSTS_TO_PODCAST_TIER_1 → Personal+ (5 generations / month) POSTS_TO_PODCAST_TIER_2 → Premium+ (10) POSTS_TO_PODCAST_TIER_3 → Business+ (20) Sites accumulate tiers through the existing _AND_HIGHER plan cascades; the lib's quota helper on the wpcom side reads from the highest tier down and returns on the first hit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * wpcomsh: Drop comment that broke phpcs alignment cascade The three-line comment above POSTS_TO_PODCAST_TIER_1 split the existing const-declarations alignment block in two, which made phpcs demand re-padding for the 60+ unmodified constants that follow. The constant names are self-documenting and the tier→quota mapping is documented at the FEATURES_MAP entries below; drop the constants-block comment to restore the prior alignment. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent dd99ac3 commit d6baab6

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: added
3+
4+
WPCOM Features: Add POSTS_TO_PODCAST_TIER_{1,2,3} features mapped to Personal+, Premium+, and Business+ plans respectively. Mirrors the wpcom-side change that gates the Posts-to-Podcast endpoint and its monthly generation quota.

projects/plugins/wpcomsh/wpcom-features/class-wpcom-features.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,9 @@ class WPCOM_Features {
454454
public const PERFORMANCE = 'performance';
455455
public const PERFORMANCE_HISTORY = 'performance-history';
456456
public const POLLDADDY = 'polldaddy';
457+
public const POSTS_TO_PODCAST_TIER_1 = 'posts-to-podcast-tier-1';
458+
public const POSTS_TO_PODCAST_TIER_2 = 'posts-to-podcast-tier-2';
459+
public const POSTS_TO_PODCAST_TIER_3 = 'posts-to-podcast-tier-3';
457460
public const PREMIUM_CONTENT_CONTAINER = 'premium-content/container';
458461
public const PERSONAL_THEMES = 'personal-themes';
459462
public const PREMIUM_THEMES = 'premium-themes';
@@ -1093,6 +1096,19 @@ class WPCOM_Features {
10931096
self::POLLDADDY => array(
10941097
self::JETPACK_BUSINESS_PLANS,
10951098
),
1099+
// POSTS_TO_PODCAST_TIER_{1,2,3} — generates a podcast-style episode
1100+
// from recent posts. Monthly quotas: TIER_1 = 5, TIER_2 = 10,
1101+
// TIER_3 = 20. Sites accumulate tiers via the _AND_HIGHER cascades;
1102+
// the lib's quota helper takes the highest tier present.
1103+
self::POSTS_TO_PODCAST_TIER_1 => array(
1104+
self::WPCOM_PERSONAL_AND_HIGHER_PLANS,
1105+
),
1106+
self::POSTS_TO_PODCAST_TIER_2 => array(
1107+
self::WPCOM_PREMIUM_AND_HIGHER_PLANS,
1108+
),
1109+
self::POSTS_TO_PODCAST_TIER_3 => array(
1110+
self::WPCOM_BUSINESS_AND_HIGHER_PLANS,
1111+
),
10961112
// PREMIUM_CONTENT_CONTAINER - premium-content requires a paid wpcom plan.
10971113
self::PREMIUM_CONTENT_CONTAINER => array(
10981114
self::WPCOM_PERSONAL_AND_HIGHER_PLANS,

0 commit comments

Comments
 (0)