feat(access-control): human-readable group subscription names#4667
Open
feat(access-control): human-readable group subscription names#4667
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n list column Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ist view Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…s with members Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n filter Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for a human-readable “Group subscription name” on WooCommerce Subscriptions, and enhances the subscriptions admin list to display/filter/search using that group context.
Changes:
- Adds a
namesetting to group subscription settings, including admin edit UI and save handling. - Customizes the Subscriptions list “Subscription” column for group subscriptions and adds a group/non-group filter.
- Extends subscription search to include the group name meta key, and adds unit tests for name behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| includes/plugins/woocommerce-subscriptions/group-subscription/class-group-subscription-settings.php | Adds group name setting, list-table display/filter/search hooks, and query helpers for group subscriptions. |
| tests/unit-tests/content-gate/group-subscriptions.php | Adds unit tests covering default/custom/updated/empty-fallback group name behavior. |
| tests/mocks/wc-mocks.php | Extends the WC_Subscription test mock with get_formatted_billing_full_name() used by the new default-name logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…n admin - Fix search WHERE clause regex to handle nested parentheses - Scope order items query to shop_subscription type only - Cache group subscription IDs in a 5-minute transient - Invalidate cache on subscription and product setting changes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an editable field to set human-readable names for Group subscriptions (which defaults to
<subscription owner>'s Group), and adds admin UX enhancements for the WooCommerce > Subscriptions list view:<group name> (<x> of <y> members)instead of the standard#<id> for <name>format, withyshowing the member limit or "unlimited" if no limit is set.WP_Querysearches.Closes NPPD-1455.
Test plan
Prerequisites
define( 'NEWSPACK_CONTENT_GATES', true );set in wp-config.phpEditable group names w/ default
<subscription owner>'s GroupUnnamed GroupSubscription column
Group filter
Search
Unit tests
n test-php --filter Test_Group_Subscriptionsand verify all 49 tests pass🤖 Generated with Claude Code