---
title: "rcp_membership_is_expired"
source: "https://docs.nexcess.com/software/kadence/restrict-content-pro/rcp_membership_is_expired/"
description: "Coming soon: Restrict Content Pro is becoming Kadence Memberships. You may see both names used while we update the product, documentation, and customer experien…"
vertical: "Software"
area: "Restrict Content Pro"
date: "2023-04-20"
last_modified: "2026-08-12"
---

# rcp_membership_is_expired

**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 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: https://codeable.io/developers/restrict-content-pro/ Filters whether or not a membership has expired. This filter replaced rcp\_member\_is\_expired in version 3.0. Parameters: $is\_expired (bool) – Whether or not the user’s membership has expired. $membership\_id (int) – ID of the membership being checked. $membership (RCP\_Membership) – RCP\_Membership object. Example: This example modifies the is\_expired() method to compare the membership expiration date to two hours ago rather than now (effectively giving the user two extra hours of membership time). function ag\_rcp\_is\_expired( $is\_expired, $membership\_id, $membership ) { // Exit early if the user hasn’t expired yet. if ( ! $is\_expired ) { return $is\_expired; } $expiration = $membership->get\_expiration\_date( false ); if( $expiration && strtotime( ‘-2 hours’, current\_time( ‘timestamp’ ) ) > strtotime( $expiration, current\_time( ‘timestamp’ ) ) ) { $is\_expired = true; } else { $is\_expired = false; } return $is\_expired; } add\_filter( ‘rcp\_membership\_is\_expired’, ‘ag\_rcp\_is\_expired’, 10, 3 );
