Browse: Home / Hooks /

learndash_get_lesson_progress

apply_filters( 'learndash_get_lesson_progress',  array $progress,  array $topics )

Filters LearnDash lesson progress.


Description #


Parameters #

$progress

(array) An Associative array of lesson progress with keys total, completed and percentage.

$topics

(array) An array of the topics of the lessons.


Source #

File: themes/ld30/includes/helpers.php


Examples #

Note: Extended code example below not guaranteed, you may need to consult with a developer

 <?php
/**
 * Example usage for learndash_get_lesson_progress filter.
 */
add_filter(
	'learndash_get_lesson_progress',
	function( $progress, $topics ) {
		// May add any custom logic using $progress, $topics.

		// Always return $progress.
		return $progress;
	},
	10,
	2
);
 

Changelog #

Changelog
Version Description
3.0.0 Introduced.