Description

This function checks if a user (which is logged in) is subscribed in a course or not. This is a boolean function, meaning it returns either TRUE or FALSE.

Usage

if ( tp_is_user_subscribed($course_id, false) ) { … }

Parameters

course_id

(integer) The ID of the course you want to check.

consider_childcourses

(boolean) Set it to TRUE if you want to consider child courses or FALSE if not. Default is FALSE.

Return

(boolean)

TRUE if the user is subscribes or FALSE of not.

Changelog

  • Since: 3.1.7