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_Membership_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 value: 1
- $dates
-
(array) (Optional) Optiona. Date range (passed to WP_Query['date_query']).
Default value: array()
Return Return
(obj)
Source Source
File: includes/class.llms.membership.data.php
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 ( $dates ) { $args['date_query'] = $dates; } $query = new WP_Query( $args ); return $query; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.10.1 | Fixed typo preventing one-time orders from adding to revenue. |
3.32.0 | Introduced. |