learndash_is_item_complete

apply_filters( 'learndash_is_item_complete',  boolean $complete,  int $user_id,  int $post_id,  int $course_id )

Filters whether the LearnDash content type is complete or not.


Description #


Parameters #

$complete

(boolean) Whether any LearnDash content is complete or not.

$user_id

(int) User ID.

$post_id

(int) Post ID.

$course_id

(int) Course ID.


Source #

File: themes/ld30/includes/helpers.php


Examples #

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

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