These abilities answer questions about an individual user’s membership: whether they are a member, what subscriptions they hold, and whether they have an access pass. They are all read-only and require the manage_options capability (site administrator). See the Abilities API Overview for requirements and the full catalog.
Identifying the User
Every ability in this group identifies the user the same way — provide exactly one of:
| Parameter | Type | Description |
|---|---|---|
user_id | integer | The WordPress user ID |
email | string | The user’s email address. Provide exactly one of user_id or email — never both |
If neither is provided the ability returns members_only_missing_user; if no matching user exists it returns members_only_user_not_found. Supplying both identifiers fails input validation, and a mismatched pair supplied directly to a callback returns members_only_conflicting_identifiers — the ability never silently prefers one identifier over the other, so an ID/email mix-up can never target the wrong account.
get-member-status
members-only/get-member-status returns a membership overview for a user — the quickest way to answer “is this person a member, and why?”
Returns:
user_idandemailis_member— whether the user counts as a member under the plugin’s ruleshas_active_membership— whether they have an active paid membershiphas_access_pass— whether they hold a currently active access passsubscription_status— the aggregate Stripe subscription statusgroup_memberships— the groups the user belongs to (empty when the Group Memberships extension is not active)
list-user-memberships
members-only/list-user-memberships lists a user’s memberships (Stripe subscriptions) filtered by status. By default it returns only active memberships.
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id / email | integer / string | One required | Identifies the user |
status | string | No | One of active, canceled, incomplete, incomplete_expired, past_due, trialing, unpaid, or all. Defaults to active. |
Returns: user_id, the status filter used, a count, a truncated flag, and a memberships array. Each membership includes the subscription ID, status, cancel_at_period_end, current period start/end timestamps, and plan details. Up to 100 subscriptions are returned per status; truncated is true when the user has more and the list is incomplete.
An unsupported status value returns members_only_invalid_status rather than silently returning an empty list.
list-member-subscriptions
members-only/list-member-subscriptions lists a user’s Stripe subscriptions regardless of status — including canceled and past-due ones — up to 100 subscriptions. Use this for a billing history view; use list-user-memberships when you want to filter by status.
Returns: user_id, a count, a truncated flag, and a subscriptions array in the same shape as list-user-memberships. When truncated is true the user has more subscriptions than the 100-subscription cap and the list is incomplete.
list-user-access-passes
members-only/list-user-access-passes returns the user’s access pass, if they have one.
Returns:
user_idhas_active_pass— whether the pass is currently activeaccess_pass— the pass with itsstart_date,end_date(Unix timestamps), andgranted_byuser ID, ornullwhen the user has no pass
Note that a user has at most one access pass at a time; an expired pass is still returned (with has_active_pass set to false) until it is removed or replaced.
