Restrict Content Pro

rcp_get_expiration_date()

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

Returns the given user’s expiration (or renewal) date in a formatted string, using the Date Format setting under Settings → General in WordPress.

This function has been deprecated since Restrict Content Pro 3.0. For new code, use RCP_Membership::get_expiration_date() on a membership record.

Parameters

$user_id (int) (optional) – ID of the user to check. If omitted or set to 0, the currently logged-in user is used.

Return values

string – none if the membership never expires, or a formatted date.

Last updated: October 7, 2026
Was this page helpful?
Thanks for the feedback!