rcp_can_member_cancel()

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/

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.

Parameters:

  • $user_id - ID of the user to check. If omitted, the currently logged in user is used.

Return values:

  • true if the given user meets all the criteria and can cancel their subscription.
  • false if they are not able to cancel their subscription.
Powered by Zendesk