learndash_pdf_username

apply_filters( 'learndash_pdf_username',  string $user_name,  int $user_id,  int $cert_id )

Filters username of the user to be used in creating certificate PDF.


Description #


Parameters #

$user_name

(string) User display name.

$user_id

(int) User ID.

$cert_id

(int) Certificate post ID.


Source #

File: includes/ld-convert-post-pdf.php


Examples #

 <?php
/**
 * Example usage for learndash_pdf_username filter.
 */
add_filter(
	'learndash_pdf_username',
	function( $user_name, $user_id, $cert_id ) {
		// May add any custom logic using $user_name, $user_id, $cert_id.

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