Restrict Content Pro

RCP_Member

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

The RCP_Member class was deprecated in version 3.0. Use RCP_Membership and RCP_Customer instead. The notes below are kept for legacy code that still references RCP_Member.

RCP_Member extends WP_User and provides access to member-specific data. It is used mainly when retrieving or updating account details for a member.

Member status

Every member has a status:

  • free â€“ Has not paid; same as a standard WordPress user account.
  • pending â€“ Transitioning to active; payment is usually pending.
  • active â€“ Account is in good standing.
  • cancelled â€“ Cancelled; access continues until expiration.
  • expired â€“ Expiration date has passed.

Methods

  • get_status() â€“ Returns the current status.
  • set_status( $new_status ) â€“ Sets the status.

Examples

$member = new RCP_Member( 1 );
$status = $member->get_status();
$member = new RCP_Member( 1 );
$member->set_status( 'active' );

Expiration dates

Expiration dates are stored in Y-n-d H:i:s format.

  • get_expiration_date( $formatted = true ) â€“ Human-readable date; pass false for unformatted.
  • get_expiration_time() â€“ Unix timestamp.
  • set_expiration_date( $new_date ) â€“ New date as Y-n-d H:i:s.
$member = new RCP_Member( 1 );
$member->set_expiration_date( '2015-12-01 12:12:01' );

Lifetime (never expire): pass none.

$member = new RCP_Member( 1 );
$member->set_expiration_date( 'none' );

Renew/Cancel

renew() and cancel() activate or deactivate without manually setting status or expiration.

$member = new RCP_Member( 1 );
$member->renew();

Recurring subscription: pass true to renew().

$member = new RCP_Member( 1 );
$member->renew( true );
$member = new RCP_Member( 1 );
$member->cancel();

Cancel recurring billing at the gateway:

$member = new RCP_Member( 1 );
$member->cancel_payment_profile();

Join date

get_joined_date( $subscription_id = 0 ) â€“ Join date in MySQL format. Optional membership level ID; if omitted, uses the current level.

Additional helper methods

Payment gateway and subscription identifiers

  • get_payment_profile_id() â€” Returns the gateway payment profile ID (customer ID or similar) stored for this member. Maps to the membership’s gateway customer ID when a membership exists.
  • set_payment_profile_id( $profile_id = ” ) â€” Sets the gateway payment profile ID on the member’s membership record.

Membership level (RCP subscription level, not the processor)

  • get_subscription_id() â€” Returns the ID of the member’s membership level (object_id), or false if none.
  • set_subscription_id( $subscription_id ) â€” Sets the membership level ID on the member’s membership record.
  • get_subscription_key() â€” Returns the unique subscription key for the membership.
  • get_subscription_name() â€” Returns the human-readable name of the member’s current membership level (via rcp_get_subscription_name()).

Payments and notes

  • get_payments() â€” Returns all payments for the member’s customer record as an array of objects, or null if there is no customer.
  • get_notes() â€” Returns admin notes stored on the customer record, or false if there is no customer.
  • add_note( $note = ” ) â€” Appends an admin note on the customer record. Returns true on success, false if there is no customer.

Status and access

  • is_active() â€” true if the user can access member content: site administrators always return true; otherwise the membership must be active and paid. Filter: rcp_is_active.
  • is_recurring() â€” true if the membership is set as recurring.
  • set_recurring( $yes = true ) â€” Sets whether the membership is recurring.
  • is_expired() â€” true if the membership is expired.
  • is_trialing() â€” true if the membership is in a trial period.
  • has_trialed() â€” true if the customer has ever used a trial (customer-level check).
  • can_access( $post_id = 0 ) â€” true if the member may view the given post: administrators and unrestricted posts always pass; restricted posts delegate to the customer’s access rules. Filter: rcp_member_can_access.

Upgrades, proration, and admin tools

  • get_switch_to_url() â€” If the User Switching plugin is active, returns a URL for an admin to switch into this user’s account (with redirect to the home URL). Otherwise returns false.
  • get_prorate_credit_amount() â€” Returns the prorate credit amount for unused time on the current membership when upgrading or changing levels; 0 if there is no membership.
  • just_upgraded() â€” Returns a Unix timestamp for a recent level upgrade stored in user meta, or false if none or if the upgrade was more than about five minutes ago. Filter: rcp_member_just_upgraded.
Last updated: October 7, 2026
Was this page helpful?
Thanks for the feedback!