rcp_is_recurring($user_id = null)
This function will check whether the user ID supplied to the function has currently active recurring subscriptions.
Parameters:
- $user_id - ID of the user to check (optional).
If no user ID is supplied, then the function will check the ID of the currently logged-in user.
Return values:
true
if the user has a recurring subscription.false
if the user does not have a recurring subscription.
Example usage:
if(rcp_is_recurring(34)) { // user ID 34 has an active and recurring subscription } else { // user ID 34 does not have a recurring subscription }