can_view_content_course( get_the_ID() ); if ( ! $can_view_course->flag ) { if ( LP_BLOCK_COURSE_FINISHED === $can_view_course->key ) { learn_press_display_message( esc_html__( 'You finished this course. This course has been blocked', 'learnpress' ), 'warning' ); } elseif ( LP_BLOCK_COURSE_DURATION_EXPIRE === $can_view_course->key ) { learn_press_display_message( esc_html__( 'This course has been blocked reason by expire', 'learnpress' ), 'warning' ); } } } ?>