public/wordpress/wp-content/plugins/wp-courseware/includes/controllers/courses.php
/**
	 * Maybe Disable Automatic Enrollment.
	 *
	 * If a course is paid, either a one-time or subscription
	 * then disabled the automatic enrollment that happens
	 * when a user is registered.
	 *
	 * @since 4.3.0
	 *
	 * @param bool $disable Boolean to disable automatic enrollment. Default is false.
	 * @param int  $course_id The course id.
	 *
	 * @return bool $disable Boolean value to disable automatic enrollment.
	 */
Maybe Disable Automatic Enrollment.
If a course is paid, either a one-time or subscription
then disabled the automatic enrollment that happens
when a user is registered.



@param bool $disable Boolean to disable automatic enrollment. Default is false.
@param int  $course_id The course id.

@return bool $disable Boolean value to disable automatic enrollment.
Maybe Disable Automatic Enrollment . If a course is paid either a one - time or subscription then disabled the automatic enrollment that happens when a user is registered . @param bool $disable Boolean to disable automatic enrollment . Default is false . @param int $course_id The course id . @return bool $disable Boolean value to disable automatic enrollment .
public function maybe_disable_autommatic_enrollment( $disable, $course_id ) {
		$payments_type = $this->get_course_payments_type( $course_id );
		if ( $payments_type && 'free' !== $payments_type ) {
			$disable = true;
		}
		return $disable;
	}
public function maybe_disable_autommatic_enrollment ( $ disable , $ course_id ) { $ payments_type = $ this -> get_course_payments_type ( $ course_id ) ; if ( $ payments_type && 'free' !== $ payments_type ) { $ disable = true ; } return $ disable ; }
Maybe Disable Automatic Enrollment.
Maybe Disable Automatic Enrollment .