Restrict Content Pro

rcp_get_members()

Coming soon: Restrict Content Pro is becoming Kadence Memberships. You may see both names used while we update the product, documentation, and customer experience.

Note: This content is provided as a resource within our developer documentation. Because custom code requires highly specific implementation, we encourage you to work with a qualified developer if you need guidance. You can find our recommended consultants here: https://codeable.io/developers/restrict-content-pro

Queries WordPress users who have RCP membership records matching filters, and returns WP_User objects.

Deprecated in 3.0. Prefer rcp_get_memberships() or rcp_get_customers for membership/customer data.

Only non-disabled memberships (disabled = 0) are included. Status active excludes free memberships (requires paid amounts); status free means active memberships with zero initial and recurring amounts.

Parameters

$status (string) – Membership status. Default: active. Empty string skips status filtering.

$subscription (int|null) – Membership level ID (object_id). Default: null (all levels).

$offset (int) – Pagination offset. Default: 0.

$number (int) – Max users to return. Default: 999999.

$order (string) – ASC or DESC by user ID. Default: DESC.

$recurring (string|null) – If set, 1 = non-recurring (auto_renew = 0); any other truthy value = recurring (auto_renew = 1).

$search (string) – Optional search: plain text (login/email), or prefixes first_name:, last_name:, payment_profile:.

Return values

(array|false) – Array of WP_User objects, or false if none match.

Examples

$users = rcp_get_members( 'active', 2, 0, 50 );

if ( is_array( $users ) ) {
	foreach ( $users as $user ) {
		// Paid active members on level #2.
	}
}
$memberships = rcp_get_memberships(
	array(
		'object_id' => 2,
		'status'    => 'active',
		'number'    => 50,
	)
);
Last updated: October 30, 2026
Was this page helpful?
Thanks for the feedback!