learndash_process_mark_complete

apply_filters( 'learndash_process_mark_complete',  boolean $mark_complete,  WP_Post $post,  WP_User $current_user )

Filters whether to mark a process complete.


Description #


Parameters #

$mark_complete

(boolean) Whether to mark a process complete.

$post

(WP_Post) WP_Post object to be checked.

$current_user

(WP_User) Current logged in WP_User object.


Source #

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


Examples #

 <?php
/**
 * Example usage for learndash_process_mark_complete filter.
 */
add_filter(
	'learndash_process_mark_complete',
	function( $mark_complete, $post, $current_user ) {
		// May add any custom logic using $mark_complete, $post, $current_user.

		// Always return $mark_complete.
		return $mark_complete;
	},
	10,
	3
);
 

Changelog #

Changelog
Version Description
2.1.0 Introduced.