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:
This function is deprecated. Use RCP_Membership->can_cancel() instead.
Determines whether or not a member is able to cancel their subscription. In order to return true, the user must meet all these criteria:
- Has a recurring subscription.
- Is currently an active member (has the status "active").
- They've not already canceled their subscription.
- Their payment profile ID has been filled out.
- $user_id - ID of the user to check. If omitted, the currently logged in user is used.
trueif the given user meets all the criteria and can cancel their subscription.
falseif they are not able to cancel their subscription.