Filter: sensei_is_legacy_enrolled

apply_filters( 'sensei_is_legacy_enrolled', $is_legacy_enrolled, $user_id, $course_id, $course_progress_comment_id ) → {bool}

Allows other providers to have an opinion about whether or not a user was enrolled pre-3.0.0. This should only be called once per user/course just after upgrading from a pre-3.0.0 version of Sensei.

Note: This will only allow manual enrolment to not be given. It won't be called for learners without course progress.

Parameters:
Name Type Description
$is_legacy_enrolled bool

If the user was actually enrolled before 3.0.0 migration.

$user_id int

User ID.

$course_id int

Course post ID.

$course_progress_comment_id int | false

Comment ID for the course progress record (if it exists).

Since:
  • 3.0.0
Source:
Returns:

Filtered value.

Type
bool