Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This hook let's you redirect to a custom page when a LearnDash course is completed.
<?php
function custom_course_completed_redirect($link, $course_id) {
$link = get_post_field( 'post_name', $course_id );
//You can change the link here
return '/congrats/' . $link;
}
add_filter("learndash_course_completion_url", custom_course_completed_redirect, 5, 2);
?>
@stringhamschools2016
Copy link

stringhamschools2016 commented Sep 7, 2017

Can this be revised to redirect a lesson?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment