LLMS_Membership::get_student_count()
Retrieve the number of enrolled students in the membership.
Contents
Return Return
(int)
Source Source
File: includes/models/model.llms.membership.php
public function get_student_count() { $query = new LLMS_Student_Query( array( 'post_id' => $this->get( 'id' ), 'statuses' => array( 'enrolled' ), 'per_page' => 1, ) ); return $query->get_found_results(); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Don't access LLMS_Student_Query properties directly. |
3.32.0 | Introduced. |