wpc_get_lesson_tracking_table( int $user_id, bool $viewed = true )

function wpc_get_lesson_tracking_table( $user_id, $viewed = true )

Returns a sortable table of either viewed or completed lessons for the user ID you’ve passed.

Parameters

$user_id (int) user ID

$viewed (bool) true for viewed lessons, false for completed lessons

Usage

// echo the completed lesson tracking table

if(is_user_logged_in()){

	$user_id = get_current_user_id();

	$table = wpc_get_lesson_tracking_table($user_id, false);

	echo $table;

}