LLMS_Course_Data::get_orders( string $period = 'current' )
Retrieve # of orders placed for the course within the period
Parameters Parameters
- $period
-
(string) (Optional) Date period [current|previous]. Default is 'current'.
Default value: 'current'
Return Return
(int)
Source Source
File: includes/class.llms.course.data.php
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | public function get_orders( $period = 'current' ) { $query = $this ->orders_query( 1, array ( array ( 'after' => $this ->get_date( $period , 'start' ), 'before' => $this ->get_date( $period , 'end' ), 'inclusive' => true, ), ) ); return $query ->found_posts; } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.21.0 | Fixed order params passed to the $this->orders_query() method. |
3.15.0 | Introduced. |