LLMS_Certificate_User::trigger( int $user_id, int $email_id, int $lesson_id )
[trigger description]
Description Description
Parameters Parameters
- $user_id
-
(int) (Required) [ID of the user receiving the certificate]
- $email_id
-
(int) (Required) [ID of the certificate]
- $lesson_id
-
(int) (Required) [ID of the associated lesson]
Return Return
(void)
Source Source
File: includes/certificates/class.llms.certificate.user.php
function trigger( $user_id, $email_id, $lesson_id ) { $this->init( $email_id, $user_id, $lesson_id ); // only award cert if the user hasn't already earned it if ( $this->has_user_earned() ) { return; } if ( $user_id ) { $this->object = new WP_User( $user_id ); $this->user_email = stripslashes( $this->object->user_email ); $this->recipient = $this->user_email; } if ( ! $this->is_enabled() ) { return; } $this->create( $this->get_content() ); }
Expand full source code Collapse full source code View on GitHub