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'


Top ↑

Return Return

(int)


Top ↑

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;
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
4.21.0 Fixed order params passed to the $this->orders_query() method.
3.15.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.