• Resolved lavalldesign

    (@lavalldesign)


    Can course registrations be closed?

    I want my Courses to be visible but I don’t want people to be able to register them because they are complete.
    How can I do it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Dan (a11n)

    (@drawmyface)

    You’d need to code that using the sensei_display_start_course_form filter. Something like this:

    
    function display_start_course_form( $should_display, $course_id ) {
    	if ( $course_id === 9999 ) {
    		return false;
    	}
    }
    function lock_course() {
    	add_filter( 'sensei_display_start_course_form', 'display_start_course_form', 10, 2 );
    }
    add_action( 'init', 'lock_course', 11 );
    

    Note that in Sensei 3.0, sensei_display_start_course_form will be deprecated in favour of sensei_can_user_manually_enrol so you’ll want to update that after updating.

    Thread Starter lavalldesign

    (@lavalldesign)

    And how can I do this for a specific course?

    I tried to report $course_id but I didn’t get it.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Close registration for a course’ is closed to new replies.