1. Home
  2. Knowledge Base
  3. Uncanny LearnDash Toolkit Pro
  4. LearnDash Reset Button

The LearnDash Reset Button module enables 2 things: a course progress reset button and a course progress reset function (for developers). The button will certainly be the more popular of the two and can be used with this shortcode:

[uo_reset_course_progress course_id="x"]

In that example, “x” is the ID for the course, which you can look up by editing your course as an admin and looking at the “post=x” value in the URL. The “x” there is the course ID.

This shortcode can be added to any post type, including course post types. We expect it will be used most often on courses, though please note that you do still need to pass in the course ID even if place on a course page. When added (and the module turned on), the button will be shown on a page only if the user viewing the button has some progress recorded for the course. The button will not be displayed if the user hasn’t started the course.

If you want to show the button on a course page and only want to show it when users have completed the course, consider wrapping it in the course_complete shortcode included in LearnDash. See https://support.learndash.com/articles/course_complete/ for more information.


For even more control over the button, you can click the gear icon in the Toolkit settings for the module to edit the button text and append the name of the course to the button. The latter is helpful if you make multiple buttons available on a single page so users can distinguish them.

Now, for developers that want to use the new course reset function included in this module in other ways, here’s what you need to know to set this up (please note that this is for developer use only):

//Replace with the user ID and course ID combination to be reset
$user_id = 10;
$course_id = 100;
$reset = new \uncanny_pro_toolkit\LearnDashReset();
$reset->reset_course_progress($user_id, $course_id);

Was this article helpful?

0 replies

Comments/Questions

Please note that this is not an official support channel and questions/comments may go unanswered.
To request support, log in to your account and click Submit a Request.

Leave a Reply

Your email address will not be published. Required fields are marked *