LLMS_Privacy_Exporters::certificate_data( string $email_address, int $page )

Export student certificate data by email address


Description Description


Parameters Parameters

$email_address

(string) (Required) email address of the user to retrieve data for

$page

(int) (Required) process page number


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/privacy/class-llms-privacy-exporters.php

	public static function certificate_data( $email_address, $page ) {

		$data = array();

		$student = self::get_student_by_email( $email_address );
		if ( ! $student ) {
			return self::get_return( $data );
		}

		$certs = self::get_student_certificates( $student );
		if ( $certs ) {

			$group_label = __( 'Certificates', 'lifterlms' );
			foreach ( $certs as $cert ) {

				$data[] = array(
					'group_id' => 'lifterlms_certificates',
					'group_label' => $group_label,
					'item_id' => sprintf( 'certificate-%d', $cert->get( 'id' ) ),
					'data' => self::get_certificate_data( $cert ),
				);

			}
		}

		return self::get_return( $data );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.18.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.