Skip to content

Instantly share code, notes, and snippets.

@mikewing94
Last active February 11, 2020 11:07
Show Gist options
  • Save mikewing94/80426b563cabf2ad7144941c61eec209 to your computer and use it in GitHub Desktop.
Save mikewing94/80426b563cabf2ad7144941c61eec209 to your computer and use it in GitHub Desktop.
<?php
global $wpdb;
global $woothemes_sensei;
$current_uid = $_GET['uid'];
$all_lessons = $wpdb->get_results("SELECT * FROM `wp_posts` WHERE `post_type` = 'lesson'");
foreach ($all_lessons as $a_lesson){
$lesson_id = $a_lesson->ID;
$lesson_title = get_the_title($lesson_id);
if (WooThemes_Sensei_Utils::user_completed_lesson($lesson_id, $current_uid)){
echo "<h3>";
echo "Completed ".$lesson_title;
echo "</h3>";
echo "<br>";
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment