Email Course Certificates

Overview

The Email Course Certificates module is part of the Pro Suite of modules for the Uncanny LearnDash Toolkit. Out of the box, LearnDash supports dynamic generation of a certificate after successful completion of a course, but the certificate must be viewed online or downloaded to the user’s computer. This Pro module extends LearnDash functionality to attach a certificate to the email that is sent to the user upon the successful completion of a course. The certificate email can also be sent to site administrators, group leader(s) or any number of related users.

*This is a global module and cannot be enabled or disabled for a specific course. This module will send out an email with the certificate .pdf attached for any course that has an associated certificate.

Module Settings

  • Use Cron to send certificate: Check this field only if you are having issues with shortcodes not outputting the correct data in the emailed certificates.  Otherwise leave it unchecked.
  • Do not store certificates on server: This module by default stores certificates on server.  This option can be disabled by checking this option.
  • Send Certificate to Site Admin/Group Leader(s): If you want a copy of the certificate sent to the Site Admin and/or Group Leader(s), simply check the respective boxes.
  • From Name/From Email: The name and email address that the certificate email will be sent from.
  • CC Certificate To: Include any email addresses that you want CC’d on the certificate email.
  • Email Subject & Email Body: The subject and content of the email.  Tokens are available and listed just below the Email Body field.

Overriding the certificate save location

For advanced developers, there is a filter available to modify the save location of the certificates:

/**
 * @param $path
 *
 * @return string
 */
function update_uo_course_certificate_save_path( $path ) {
   $new_path = ''; //New root path, absolute path
   return $new_path;
}
add_filter( 'uo_course_certificate_save_path', 'update_uo_course_certificate_save_path' );

Overriding the certificate file name

For advanced developers, there is a filter available to modify the filename of the generated certificates:

/**
* @param $file_name
* @param $user
* @param $course_id
* @param $certificate_post
* @param $timestamp
*
* @return string
*/
function update_course_certificate_filename( $file_name, $user, $course_id, $certificate_post, $timestamp ) {
$user_id = $user->ID;
date_default_timezone_set( 'America/New_York' );
$current_date = date( 'Y-m-d' );
return "{$user_id}-{$course_id}-{$current_date}";
}
add_filter( 'uo_course_completion_certificate_filename', 'update_course_certificate_filename', 20, 5 );

 

22 replies
    • Ryan
      Ryan says:

      We’ll consider the changes for a future release, but I’m afraid we can’t promise anything. Right now we haven’t had many requests for either change, but certainly there is value for some users in adding those.

      Reply
  1. Bobbie
    Bobbie says:

    90% of the SETTINGS button doesn’t work to open the UI. I need to make changes, but can’t get to the settings screen.

    Reply
    • Ryan
      Ryan says:

      Hi Bobbie, we unfortunately can’t provide support in the Knowledge Base, but please do log a ticket or send us an email so we can help. There is no known issue related to this; it’s likely a javascript conflict on your site. When you open a ticket, make sure you let us know exactly what you’re seeing when you’re trying to open and save settings. Also check the javascript console (View > Developer > Javascript Console in Chrome) to see if any errors are output there.

      Reply
  2. Marco Moncalvo
    Marco Moncalvo says:

    Hello, I changed the text in the mail body, but it keeps sending a message in english (i wrote a custom one in tialian)

    Reply
  3. David Crim
    David Crim says:

    Hi Ryan or UO friends!,
    We’re suddenly noticing that emailed certificates from Course Completions do not include the Student’s First and Last Name ([usermeta field="user_firstname"] [usermeta field="user_lastname"]), but are showing up correctly in the users’ accounts. We have recently been making some changes related to our checkout which have caused some frustrations in this area, so it may not be related to UOLTP, but I did notice in your recent changelog that you’ve created a cron job for this service on large sites (like us).
    Prior to digging deeper in other areas, I wanted to check and see if the issue of missing Student Names in certificates is possibly one of the symptoms you saw with other users that led you to create the cron job option? I’d appreciate it if you could let me know.
    Thank you!
    David

    Reply
    • Ryan
      Ryan says:

      Hi David,

      We did build that new cron system because of shortcode rendering issues we saw on a few sites, but not usermeta shortcodes. In all cases they were custom shortcodes only populated after course completion, later than we could hook in for the email. Switching that setting might help in your situation, but it might not. If it’s not, submit a ticket and we can take a look at what might be happening.

      Reply
  4. Chrissy
    Chrissy says:

    With this feature is there anyway to only set it that it be emailed for specific courses? I have a situation where some courses we will send the certificate manually after review of material, and other courses they can receive the certificate right away.

    Reply
    • Ryan
      Ryan says:

      I’m afraid there’s no way to set the behaviour for individual courses. If the module is on and courses have a certificate assigned, the email will go out. You could potentially work around it by ending courses with a quiz that has to be graded by a reviewer to trigger course completion, or potentially have code that suppresses emails if it detects the certificate will be sent for a course that shouldn’t get the certificate. Note though that even without the email (unless you’ve done a template override), users can still get the certificate themselves from the course page after course completion.

      Reply
  5. Chrissy Miller
    Chrissy Miller says:

    Thanks for the info! My developer is able to code it that the course certificate will only show after course completion for specific courses so we found a workaround

    Reply
  6. Matthew Reilly
    Matthew Reilly says:

    HI

    I Have this plugin installed and it is working perfectly I was just wondering is there any way for variables for Woocommce or the user address on sign up to be displayed and even if the Uncanny Owls Codes could be displayed as a variable and what the code and was that was used…. even the prefix?

    Regards,
    Matthew

    Reply
    • Ryan
      Ryan says:

      Hi Matthew, thanks for the inquiry. For any data specific to the user you may be able to use the usermeta shortcode included in LearnDash; it will work in certificates and would allow you to pull additional user information into certificates. The Codes solution you want is not available though. In a future release of Automator you can expect an integration that would allow passing codes as tokens in emails, but I think that’s about as close as we’ll get to what you want.

      Reply
  7. Stan
    Stan says:

    Students who have completed courses are receiving certificates BUT only short codes show up on certificate.

    1. How do I correct the problem?
    2. Is there a way I can manually send certificates to the learners who received the “blank certificates” noted above.

    Thanks!

    Stan

    Reply
    • Ryan
      Ryan says:

      Hi Stan,

      If you’re running LearnDash 3.2.x, please note that there were some issues with the release and they changed PDF libraries, so make sure you’re running the latest version from them and our latest Toolkit Pro release. Beyond that, in the module settings make sure you enable the cron option; this helps to populate values that might not be available when we send the email out. If you’re seeing another issue, please make sure you log a ticket from your account on our website or send an email from the purchasing email address to [email protected]. That’s the best way we can provide support. Also let us know there if the emails from LearnDash (so the certificate on the course page) so we can make sure the issue isn’t on the LearnDash side.

      Reply
  8. Chrissy
    Chrissy says:

    Pre-sales question, please. Please let me know what happens if a user changes settings in LearnDash profile, correcting the first name, last name. In this case LearDash certificates are generated dynamically. But can the email be sent out again with the corrected pdf certificate attached? Can it be reflected on the certificate after the certificate has already bees issued and sent out by email? Thanks!

    Reply
    • Ryan
      Ryan says:

      Hi Chrissy,

      I’m afraid it wouldn’t work. Certificates are issued at the time of completion only, they cannot be resent after a profile update. The ones that are emailed and stored to the server are a permanent record of the completion data at the time of completion. Yes, this behaviour is different than regular LearnDash certificates that are generated on demand using data for the user that’s available at the time of generation, not necessarily at the time of completion.

      Reply
    • Ryan
      Ryan says:

      It does not… but we will be releasing a solution for this in Q4. Currently we only have modules for course and quiz certificates. (Of course, you can send certificates for anything you want now with Uncanny Automator, where you could set up recipes that send certificates based on the completion of a set of courses.)

      Reply
  9. Mike
    Mike says:

    Can the emails be sent retroactively to users who have already completed a course, or just future completions (after activating this module)?

    Reply
    • Ryan Moore
      Ryan Moore says:

      This specific module sends emails to users as they complete courses only. It cannot be used to send completion emails automatically.

      With Uncanny Automator, you could build a recipe that does send a certificate to anyone that has completed a course. It would require our Pro version though to set up a recipe that can loop through users with the course completion.

      Reply

Comments/Questions

Please note that this is not a support forum. If you are experiencing issues on your site, please open a support ticket instead. Site-specific support questions submitted as comments will be unanswered.

Leave a Reply