Skip to content

Subscribe Block: enable customizing the button-only pop-up via the editor - #51255

Draft
gabrielcaires wants to merge 1 commit into
trunkfrom
add/subscribe-button-only-local-popup
Draft

Subscribe Block: enable customizing the button-only pop-up via the editor#51255
gabrielcaires wants to merge 1 commit into
trunkfrom
add/subscribe-button-only-local-popup

Conversation

@gabrielcaires

Copy link
Copy Markdown
Contributor

Fixes #

Proposed changes

  • Add Jetpack_Subscribe_Modal_Button, a local pop-up shown when a visitor clicks a "Button only" style Subscribe block, mirroring Jetpack_Subscribe_Modal's existing pattern (editable Site Editor template part, no separate settings field).
  • Update the Subscribe block's frontend script: when a "Button only" style form is submitted with no email, open the new local pop-up instead of the checkout iframe. Submitting the pop-up's own embedded Subscribe block hands off to the checkout iframe as before, this time with the email already populated — skipping the iframe's email-collection screen, same as every other Subscribe block style already does.
  • Replace the "Subscribe modal heading" settings card (a free-text field) with a 5th entry in the existing "Subscriptions" placements grid — "Subscribe button pop-up," always-on, with the same "Preview and edit" link into the Site Editor as its siblings.
  • Seed the new template part's default heading from the legacy subscribe_modal_heading site option, so a site that already customized it doesn't lose that text.

Related product discussion/links

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

No.

Testing instructions

  • Add a Subscribe block set to the "Button only" style to a post accessible to everybody.
  • View the post logged out.
  • Click the Subscribe button — a local pop-up should open (no iframe yet), with a heading and an email field.
  • Fill in an email and submit — the checkout iframe (subscribe.wordpress.com/memberships) should now open with the email already populated, skipping straight to plan selection/thanks (not asking for email again).
  • In Newsletter Settings, confirm the "Subscribe modal heading" text field is gone, and the "Subscriptions" grid now shows a 5th "Subscribe button pop-up" card with a "Preview and edit" link that opens the jetpack-subscribe-modal-button template part in the Site Editor.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 13, 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/subscribe-button-only-local-popup branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack add/subscribe-button-only-local-popup

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 [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Package] Newsletter [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Aug 13, 2026
@github-actions

github-actions Bot commented Aug 13, 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: September 7, 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 Aug 13, 2026
@gabrielcaires gabrielcaires changed the title Subscribe Block: open a local pop-up for "Button only" style before checkout Subscribe Block: enable customizing the button-only pop-up via the editor Aug 13, 2026
@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

Cannot generate coverage summary while tests are failing. 🤐

Please fix the tests, or re-run the Code coverage job if it was something being flaky.

Full summary · PHP report · JS report

…itor

The "Button only" Subscribe block style renders no visible email input,
so it opened the subscribe.wordpress.com checkout iframe with an empty
email, which then had to ask for it inside the iframe itself. Every
other style avoids this by collecting email inline first.

Add Jetpack_Subscribe_Modal_Button, a local pop-up mirroring
Jetpack_Subscribe_Modal's existing pattern (editable Site Editor
template part, no settings field). Clicking a "Button only" block now
opens this pop-up first; submitting its own embedded Subscribe block
hands off to checkout as before, this time with email populated.

Replace the "Subscribe modal heading" settings field with a 5th entry
in the existing Subscriptions placements grid, consistent with the
other pop-ups it sits alongside.
@gabrielcaires
gabrielcaires marked this pull request as draft August 13, 2026 16:37
@gabrielcaires
gabrielcaires force-pushed the add/subscribe-button-only-local-popup branch from 4258d58 to 6e2aa27 Compare August 13, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Subscriptions [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Package] Newsletter [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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant