rcp_set_expiration_date()

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_update_membership() instead.
rcp_set_expiration_date( $user_id = 0, $new_date = ” )
Use this function to set a new expiration date for a given user.
Parameters:

$user_id (int) (optional) – The ID of the user to set the expiration date for. Set to 0 to use the ID of the currently logged-in user.

$new_date (string) – The new expiration date to set. This should be passed as a MySQL date string.

Return values:

true if the operation was successful.

false if the expiration date was not successfully updated.

Have more questions?

Submit a request