Automattic / Automattic/jetpack

Add option for all payment plans to Paid Content block

Open
#36,295 0 comments 0 reactions 0 assignees View on GitHub
[Block] Paid Content [Block] Premium Content [Plugin] Jetpack [Pri] Normal Earn Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

Jetpack

### What

I would like to create a reusable pattern with the Paid Content block that is future-proof and will account for payment plans that have not yet been added to a site

### How

In the current iteration of the Paid Content block, each payment plan needs to be selected even when those payment plans are associated with the same access tier. When selected, the ID of the payment plan(s) is added as a block attribute.

Screen Shot 2024-03-08 at 10 31 30 AM

If I use this block in its current form on current content—or in patterns to be used for future content—and then one day add a new payment plan, it seems that I would also then need to update blocks on all old content. It should be possible to set this as "All plans" and _maybe_ one day a configurable set of grouped plans.

It's also very possible I'm missing something. :)

Contributor guide

Open the contributing guide

Research direction

Start at the Jetpack Paid Content block and trace how payment plans are selected and stored as block attributes. Check how the block handles plans associated with access tiers, then verify that an “All plans” choice includes payment plans added later without requiring existing content or patterns to be updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, react, wordpress
Domain
content, frontend, payments
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.