Created
January 12, 2017 23:33
-
-
Save manlioma/eba606184cebb467b6cd55fa06e68c9b to your computer and use it in GitHub Desktop.
Funzione Per Sensei Corso COmpletato da Lezione
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Controllo se l'utente ha completato il corso | |
$course_id = intval( get_post_meta( $post->ID, '_lesson_course', true ) ); // Id del corso di cui fa parte la lezione | |
$user_id = get_current_user_id(); // Id Utente | |
// Check if course is completed | |
$user_course_status = Sensei_Utils::user_course_status( $course_id, $user_id ); | |
$completed_course = Sensei_Utils::user_completed_course( $user_course_status ); | |
// Success message | |
if ( $completed_course ) { ?> | |
<h2>Hai Completato il Corso vai al prossimo Corso</h2> | |
<?php } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment