Restrict Content Pro
rcp_is_recurring()
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
Deprecated since 3.0. Checks whether the user has a recurring subscription via the legacy RCP_Member object.
For a specific membership record, load it with rcp_get_membership() and use $membership->is_recurring(), or use the rcp_membership_is_recurring() helper in the plugin (do not link that name to the rcp_membership_is_expired filter doc — that URL is the filter, not this function).
Parameters
$user_id (int) – User ID. Default: 0 (current logged-in user when $user_id is empty and the visitor is logged in).
Return values
(bool) – true if the legacy member check reports a recurring subscription; otherwise false.
Examples
$membership = rcp_get_membership( 123 );
if ( $membership && $membership->is_recurring() ) {
// Membership #123 is recurring.
}