rcp_member_has_trialed

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/
Filters whether or not a member has signed up for a trial in the past. Restrict Content Pro only allows users to sign up for one trial by default, so you may want to use this filter if you want to allow a user to sign up for multiple trials.
Parameters:

$has_trialed (bool) – True if the member has used a trial, false if they have not.

$user_id (int) – ID of the user being checked.

Example:
This would always return “false”, which would allow a user to sign up for multiple trials:
add_filter( ‘rcp_member_has_trialed’, ‘__return_false’ );

Have more questions?

Submit a request