rcp_is_expired()

rcp_is_expired($user_id = null)

This function will check whether the subscription of the user ID supplied to the function is expired.

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's subscription is expired.
  • false if the user's subscription is not expired.

Example usage:

if(rcp_is_expired(34)) {
	// user ID 34's subscription is expired
} else {
	// user ID 34's subscription is active, not expired
}