Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code. 

If you need assistance with this, please reach out to our list of consultants for further assistance:

This function is deprecated. Use rcp_get_memberships() instead.

rcp_get_members_of_subscription( $level_id = 1, $fields = 'ID' )

Used to retrieve all members for a given subscription level. This function does not take status into account, so it will return all active, expired, cancelled, and pending users as long as they're assigned to this subscription level.


  • $level_id (int) (optional) - ID of the subscription level to get members from. Default is 1.
  • $fields (string) (optional) - Which fields you'd like to include in the array that is returned. Options include:
    • ID - Return an array of user IDs. This is the default.
    • display_name - Return an array of user display names.
    • login - Return an array of user login names.
    • email - Return an array of user email addresses.
    • all - Return an array of WP_User objects.

Return values:

  • array - An array of user fields, depending on what you specified in the $fields parameter.
Have more questions? Submit a request
Powered by Zendesk