Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Engagement_Handler::handle( string $type, array $args )

Handle validation and creation of an earned achievement or certificate.

Parameters Parameters


(string) (Required) Type of engagement, either "achievement" or "certificate".


(array) (Required) Indexed array of arguments.

  • (int) WP_User ID.
  • '1'
    (int) WP_Post ID of the achievement or certificate template post.
  • '2'
    (int|string) WP_Post ID of the related post that triggered the award or an empty string.
  • '3'
    (int) WP_Post ID of the engagement post.

Top ↑

Return Return

(WP_Error[]|LLMS_User_Achiemvent|LLMS_User_Certificate) An array of errors or the earned engagement object

Top ↑

Source Source

File: includes/class-llms-engagement-handler.php

	private static function handle( $type, $args ) {

		$can_process = self::can_process( $type, ...$args );
		if ( true !== $can_process ) {
			return $can_process;

		$dupcheck = self::dupcheck( $type, ...$args );
		if ( true !== $dupcheck ) {
			return array( $dupcheck );

		return self::create( $type, ...$args );


Top ↑

Changelog Changelog

Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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