Skip to content

feat(access-control): filter the subscription lists available for signup#2053

Merged
dkoo merged 2 commits intotrunkfrom
feat/access-control-premium-newsletters
Apr 1, 2026
Merged

feat(access-control): filter the subscription lists available for signup#2053
dkoo merged 2 commits intotrunkfrom
feat/access-control-premium-newsletters

Conversation

@dkoo
Copy link
Copy Markdown
Contributor

@dkoo dkoo commented Mar 20, 2026

All Submissions:

Changes proposed in this Pull Request:

Adds a filter callback for the available reader-facing subscription lists. Required for access control functionality in Automattic/newspack-plugin#4589.

How to test the changes in this Pull Request:

See Automattic/newspack-plugin#4589.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@dkoo dkoo self-assigned this Mar 20, 2026
@dkoo dkoo changed the title feat(access-control): filter the subscription lists available to read… feat(access-control): filter the subscription lists available for signup Mar 20, 2026
@dkoo dkoo marked this pull request as ready for review March 27, 2026 17:55
@dkoo dkoo requested a review from a team as a code owner March 27, 2026 17:55
Copilot AI review requested due to automatic review settings March 27, 2026 17:55
Copy link
Copy Markdown
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

Adds an extensibility hook to let other components (e.g., access control) filter which configured subscription lists are returned for the current ESP provider.

Changes:

  • Capture the configured lists for the current provider into a variable.
  • Introduce a new newspack_newsletters_subscription_lists filter applied to those lists before returning them.

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

Comment thread includes/class-subscription-lists.php
Comment thread includes/class-subscription-lists.php
Comment thread includes/class-subscription-lists.php
@dkoo dkoo merged commit f8aea0b into trunk Apr 1, 2026
21 checks passed
@dkoo dkoo deleted the feat/access-control-premium-newsletters branch April 1, 2026 17:03
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

Hey @dkoo, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Apr 2, 2026
# [3.31.0-alpha.1](v3.30.0...v3.31.0-alpha.1) (2026-04-02)

### Bug Fixes

* **dependencies:** rebuild package-lock.json ([#2066](#2066)) ([6e82e00](6e82e00))
* **posts-inserter:** handle missing featured images; improve performance ([#1969](#1969)) ([cf5a47d](cf5a47d))
* update block support declaration ([#2060](#2060)) ([10a4468](10a4468))
* update removing block visibility ([#2056](#2056)) ([93d5e80](93d5e80))

### Features

* **access-control:** filter the subscription lists available to readers for signup ([#2053](#2053)) ([f8aea0b](f8aea0b))
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 2, 2026

🎉 This PR is included in version 3.31.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Apr 13, 2026
# [3.31.0](v3.30.0...v3.31.0) (2026-04-13)

### Bug Fixes

* **dependencies:** rebuild package-lock.json ([#2066](#2066)) ([6e82e00](6e82e00))
* **posts-inserter:** handle missing featured images; improve performance ([#1969](#1969)) ([cf5a47d](cf5a47d))
* update block support declaration ([#2060](#2060)) ([10a4468](10a4468))
* update removing block visibility ([#2056](#2056)) ([93d5e80](93d5e80))

### Features

* **access-control:** filter the subscription lists available to readers for signup ([#2053](#2053)) ([f8aea0b](f8aea0b))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 3.31.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Approved Ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants