learndash_course_status

apply_filters( 'learndash_course_status',  string $course_status_str,  int $course_id,  int $user_id,  array $name )

Filters the current status of the course.


Description #


Parameters #

$course_status_str

(string) The translatable current course status string.

$course_id

(int) Course ID.

$user_id

(int) User ID.

$name

(array) Current course progress.


Source #

File: includes/course/ld-course-progress.php


Examples #

 <?php
/**
 * Example usage for learndash_course_status filter.
 */
add_filter(
	'learndash_course_status',
	function( $course_status_str, $course_id, $user_id, $name ) {
		// May add any custom logic using $course_status_str, $course_id, $user_id, $name.

		// Always return $course_status_str.
		return $course_status_str;
	},
	10,
	4
);