Skip to content

WIP - add newsletter free tier settings jp#49585

Draft
Addison-Stavlo wants to merge 5 commits into
trunkfrom
add/newsletter-free-tier-settings
Draft

WIP - add newsletter free tier settings jp#49585
Addison-Stavlo wants to merge 5 commits into
trunkfrom
add/newsletter-free-tier-settings

Conversation

@Addison-Stavlo

Copy link
Copy Markdown
Contributor

Fixes #

Proposed changes

Related product discussion/links

Does this pull request change what data or activity we track or use?

Testing instructions

  • Go to '..'

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the add/newsletter-free-tier-settings branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack add/newsletter-free-tier-settings

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions Bot added [Feature] WPCOM API [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] In Progress [Tests] Includes Tests labels Jun 12, 2026
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!


Jetpack plugin:

The Jetpack plugin has different release cadences depending on the platform:

  • WordPress.com Simple releases happen as soon as you deploy your changes after merging this PR (PCYsg-Jjm-p2).
  • WoA releases happen weekly.
  • Releases to self-hosted sites happen monthly:
    • Scheduled release: July 7, 2026
    • Code freeze: July 6, 2026

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Jun 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for configuring the Newsletter free subscription tier via the existing subscription_options site setting, including sanitization and API exposure across Jetpack’s settings endpoints.

Changes:

  • Extend subscription_options to accept free_tier_description (HTML stripped + length-capped) and hide_free_tier (boolean).
  • Update both the WP.com JSON API site settings endpoint and Jetpack Core REST module endpoints to persist these new keys.
  • Add/extend PHPUnit coverage and add a changelog entry.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
projects/plugins/jetpack/tests/php/json-api/WPCOM_JSON_API_Site_Settings_V1_4_Endpoint_Test.php Adds POST tests for free tier description sanitization/length capping and hide flag handling.
projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php Allows and sanitizes new subscription_options keys when updating settings via WP.com JSON API.
projects/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php Mirrors subscription_options updates/sanitization for the Core REST module endpoints.
projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php Updates schema/description/defaults and validation allowlist for subscription_options.
projects/plugins/jetpack/changelog/add-newsletter-free-tier-settings Documents the new settings in the Jetpack changelog.

Comment thread projects/plugins/jetpack/changelog/add-newsletter-free-tier-settings Outdated
@jp-launch-control

jp-launch-control Bot commented Jun 12, 2026

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 4 files.

File Coverage Δ% Δ Uncovered
projects/plugins/jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php 177/856 (20.68%) -0.24% 10 💔
projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php 404/865 (46.71%) 0.51% 1 ❤️‍🩹
projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php 1688/2617 (64.50%) 0.03% 0 💚
projects/plugins/jetpack/class.json-api.php 44/475 (9.26%) 0.21% -1 💚

Full summary · PHP report · JS report

If appropriate, add one of these labels to override the failing coverage check: Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comment thread projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread projects/plugins/jetpack/_inc/lib/class.core-rest-api-endpoints.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] WPCOM API [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] In Progress [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants