Contents
Snippet #
LearnDash – Adds the course content beneath the prerequisite alert message
function ld_course_content_after_alert() {
$courseid = learndash_get_course_id();
$user_id = get_current_user_id();
if ( ! learndash_course_completed( $user_id, $courseid ) ) {
$coursecontent = get_the_content();
echo $coursecontent;
}
}
add_action( 'learndash-alert-after', 'ld_course_content_after_alert' );