Skip to content

Subscription Block: only add excerpt link to Newsletters#47311

Merged
arcangelini merged 6 commits intotrunkfrom
fix/subscription-block-excerpt-text
Feb 25, 2026
Merged

Subscription Block: only add excerpt link to Newsletters#47311
arcangelini merged 6 commits intotrunkfrom
fix/subscription-block-excerpt-text

Conversation

@arcangelini
Copy link
Member

@arcangelini arcangelini commented Feb 24, 2026

Closes https://linear.app/a8c/issue/NL-470/only-append-subscribe-message-in-newsletter-email-render

Proposed changes:

After Before
Screen Shot 2026-02-25 at 12 15 11 Screen Shot 2026-02-25 at 12 17 02

Remove the jetpack_filter_excerpt_for_newsletter method from the excerpt filter and delete the method.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

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

No

Testing instructions:

  1. Go to your Newsletter settings and set it to show Excerpt.
  2. Create a post with and add a subscriptions block from the block inserter.
  3. Set an excerpt or add some extra content to the post
  4. Preview email for the post and ensure View post to subscribe to site newsletter. is gone

@arcangelini arcangelini self-assigned this Feb 24, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

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 fix/subscription-block-excerpt-text branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/subscription-block-excerpt-text

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 [Block] Subscriptions [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] In Progress labels Feb 24, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

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: March 3, 2026
    • Code freeze: March 3, 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 Feb 24, 2026
@jp-launch-control
Copy link

jp-launch-control bot commented Feb 24, 2026

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php 121/671 (18.03%) 0.07% -7 💚

Full summary · PHP report · JS report

@arcangelini arcangelini requested a review from a team February 25, 2026 11:07
@arcangelini arcangelini marked this pull request as ready for review February 25, 2026 11:12
Copilot AI review requested due to automatic review settings February 25, 2026 11:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the Subscriptions block’s global excerpt mutation that appended a “View post … subscribe” message, preventing that text from being injected into excerpts (including newsletter excerpt emails), and records the fix in the Jetpack changelog.

Changes:

  • Removed the get_the_excerpt filter hook that appended newsletter subscription messaging when a post contained the Subscriptions block.
  • Deleted the now-unused jetpack_filter_excerpt_for_newsletter() function.
  • Added a changelog entry documenting the bugfix.

Reviewed changes

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

File Description
projects/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php Removes the excerpt filter + helper that appended the “View post … subscribe” message.
projects/plugins/jetpack/changelog/fix-subscription-block-excerpt-text Adds a patch-level changelog note for the behavior change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 25, 2026 11:24
Copy link
Contributor

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jeherve jeherve added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Feb 25, 2026
@arcangelini arcangelini merged commit 83e5487 into trunk Feb 25, 2026
80 of 81 checks passed
@arcangelini arcangelini deleted the fix/subscription-block-excerpt-text branch February 25, 2026 12:30
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Feb 25, 2026
@github-actions github-actions bot added the [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. label Feb 25, 2026
@github-actions github-actions bot added this to the jetpack/15.6 milestone Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Subscriptions Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Status] UI Changes Add this to PRs that change the UI so documentation can be updated.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants