learndash-get-user-stats

apply_filters( 'learndash-get-user-stats',  array $stats,  int $user_id )

Filters LearnDash user stats. Used to modify user details like courses, points, certificates.


Description #


Parameters #

$stats

(array) User stats

$user_id

(int) User ID.


Source #

File: themes/ld30/includes/helpers.php


Examples #

 <?php
/**
 * Example usage for learndash-get-user-stats filter.
 */
add_filter(
	'learndash-get-user-stats',
	function( $stats, $user_id ) {
		// May add any custom logic using $stats, $user_id.

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