learndash_get_certificate_link( int $quiz_id, int|null $user_id = null, bool $url_only = false )
Gets the certificate link if the certificate exists and quizzes are completed.
Description #
Parameters #
- $quiz_id
-
(int) (Required) Quiz ID.
- $user_id
-
(int|null) (Optional) User ID.
Default value: null
- $url_only
-
(bool) (Optional) Whether to return only the URL or the HTML output.
Default value: false
Return #
(string) Certificate link HTML output or empty string.
Source #
Changelog #
| Version | Description |
|---|---|
| 5.0.0 | Add $url_only parameter to return only the URL. |
| 2.1.0 | Introduced. |