Is your organization struggling to manage annual certifications in LearnDash? Many businesses and organizations rely on recurring certifications to ensure their staff stays compliant with industry standards. Yet, LearnDash doesn’t natively support retaking a course on an annual or timed basis, leaving you with a critical gap in functionality.
If you’re facing this issue, you’re not alone.
Just looking for the code? Click here to jump to our implementation.
The Challenge: LearnDash and Course Retakes
LearnDash is one of the most robust learning management systems (LMS) available for WordPress. It’s widely used by agencies and businesses to deliver online courses and certifications. However, it falls short when it comes to handling the need for course retakes based on expiration dates for certifications. Organizations that require their users to maintain certifications—whether in health, IT, or other fields—find that they cannot easily reset a course and allow users to retake it when their certification expires.
This is a significant limitation. As certification timelines come to an end, users need to retake courses to remain compliant, but without a built-in way to reset course progress and re-enroll students automatically, many organizations find themselves duplicating courses or manually removing user progress—a time-consuming and unsustainable task as the number of learners grows.
So, what’s the solution?
The Solution: Implementing Retake Functionality in LearnDash
To address this issue, we’ll walk you through how to implement a custom solution that resets a user’s course completion and progress in LearnDash, enabling them to retake a course for certification renewal. Whether you’re an agency looking to implement this for a client or a site owner managing certifications directly, this guide will help you add this essential functionality.
The Approach
At its core, the solution involves resetting a user’s course progress, removing their completion status, and marking them as eligible to retake the course. While this can be achieved with straightforward code, as we’ll demonstrate, scalability becomes an issue when handling larger numbers of users. For larger organizations with thousands of learners, it’s critical to implement asynchronous or background processes to prevent your site from slowing down or crashing when processing a high volume of requests.
In this post, we’ll touch on two key components:
- LearnDash Core Functionality: How to reset course progress for individual users.
- Uncanny Continuing Education Credits (CEC): An add-on that helps track certification requirements, making it easier to manage compliance for your learners.
Step-by-Step Implementation
Now let’s dive into the steps for implementing this functionality. While this guide is written with developers in mind, we’ve also included advice for non-developers on how to approach this process or find the right person for the job.
Step 1: Understanding the Requirements
To reset a user’s progress, you’ll need to interact with the LearnDash core functionality and remove the user’s course completion records. The goal is to essentially “erase” their prior course attempt, so they can start from scratch as though they’ve never taken the course before.
Step 2: Implementing the Custom Code
We won’t go into too much detail on the code here since you can find the complete solution below. But, in summary, this involves:
- Identifying the user’s ID and the course ID.
- Deleting course completion and progress data for the user.
Step 3: Scaling with Asynchronous Processes
For sites with a large user base, running this process in real-time for every user can overload your server. This is why we recommend implementing background processes that handle the resetting in batches or during low-traffic periods. Tools like WP Background Processing or the built-in WordPress cron system can help manage these background tasks efficiently. We aren’t going to cover this here, but you can reach out to us for help setting up a background process.
Additional Tools: Uncanny Continuing Education Credits
If you’re using LearnDash to track certifications, it’s worth considering the Uncanny Continuing Education Credits (CEC) plugin. This add-on allows you to assign CEUs (Continuing Education Units) for courses and track users’ progress toward meeting certification requirements.
With this plugin, you can automate the calculation of CEUs, making it easy to verify whether users have completed the necessary number of credits. Combining Uncanny CEC with your custom course reset functionality gives you a comprehensive solution for managing certification renewals.
How This Benefits You
This solution saves time, simplifies course management, and provides a smoother experience for your learners. For agencies managing multiple clients, it also means less manual work and a scalable solution for handling a growing user base.
If you’re not comfortable implementing the code on your own or you’re working with a large number of users, we’re here to help. Our team has extensive experience with LearnDash, WordPress, and scalable background processes. We can help you implement this solution efficiently and at scale, ensuring your users can easily retake courses without performance issues.
The Code
To delete the user’s course completion and course progress, use the following code:
delete_user_meta( $user_id, 'course_completed_' . $course_id ); // remove course completion
learndash_delete_course_progress( $course_id, $user_id ); // reset course progress
We recommend saving the prior completion in case you want to use it in a custom shortcode to display on your website. That might look something like this:
if ( ! $courses_completed = get_user_meta( $user_id, 'courses_completed', true ) ) {
$courses_completed = array();
}
if ( empty( $courses_completed[ $course_id ] ) ) {
$courses_completed[ $course_id ] = array();
}
$courses_completed[ $course_id ][] = get_user_meta( $user_id, 'course_copmpleted_' . $course_id, true );
If you want to also reset CEU data from Uncanny Continuing Education Credits, also delete the following usermeta:
// $completed is the timestamp that the course was completed. Get the value from the above 'course_completed_{course_id}' usermeta field.
delete_user_meta( $user_id, 'ceu_earned_' . $completed . '_' . $course_id );
delete_user_meta( $user_id, 'ceu_date_' . $completed . '_' . $course_id );
delete_user_meta( $user_id, 'ceu_title_' . $completed . '_' . $course_id );
delete_user_meta( $user_id, 'ceu_course_' . $completed . '_' . $course_id );
Here’s what that looks like that looks like when you put it all together:
function mission_lab_reset_course_progress( $course_id, $user_id ) {
// save the course completed date to our custom courses completed array
if ( ! $courses_completed = get_user_meta( $user_id, 'courses_completed', true ) ) {
$courses_completed = array();
}
if ( empty( $courses_completed[ $course_id ] ) ) {
$courses_completed[ $course_id ] = array();
}
$completed = get_user_meta( $user_id, 'course_completed_' . $course_id, true );
$courses_completed[ $course_id ][] = $completed;
delete_user_meta( $user_id, 'course_completed_' . $course_id ); // remove course completion
learndash_delete_course_progress( $course_id, $user_id ); // reset course progress
// handle CEU expiration
delete_user_meta( $user_id, 'ceu_earned_' . $completed . '_' . $course_id );
delete_user_meta( $user_id, 'ceu_date_' . $completed . '_' . $course_id );
delete_user_meta( $user_id, 'ceu_title_' . $completed . '_' . $course_id );
delete_user_meta( $user_id, 'ceu_course_' . $completed . '_' . $course_id );
}
Ready to Implement This Solution?
Whether you’re a mid-level developer looking to add this functionality or a site owner who needs a seamless course retake experience for your users, this custom LearnDash solution will help you stay compliant and save time.
Need help? Reach out to us at Mission Lab, and we’ll help you implement a scalable, effective solution for your certification needs. We can also talk about other supporting functionality for course expiration such as user notification emails, prior completion shortcodes, and more. We specialize in helping agencies and businesses streamline their WordPress and LearnDash projects, so you can focus on what matters most—your learners.
This post was written with the assistance of AI tools.

