Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Course_Data::orders_query( int $num_orders = 1, array $dates = array() )
Execute a WP Query to retrieve orders within the given date range
Parameters Parameters
- $num_orders
-
(int) (Optional) Number of orders to retrieve. Default is
1
.Default value: 1
- $dates
-
(array) (Optional) Date range (passed to WP_Query['date_query']). Default is empty array.
Default value: array()
Return Return
(WP_Query)
Source Source
File: includes/class.llms.course.data.php
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | private function orders_query( $num_orders = 1, $dates = array () ) { $args = array ( 'post_type' => 'llms_order' , 'post_status' => array ( 'llms-active' , 'llms-completed' ), 'posts_per_page' => $num_orders , 'meta_key' => '_llms_product_id' , 'meta_value' => $this ->post_id, ); if ( ! empty ( $dates ) ) { $args [ 'date_query' ] = $dates ; } return new WP_Query( $args ); } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.21.0 | Fixed the post status for completed orders. |
3.15.0 | Introduced. |