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()


Top ↑

Return Return

(obj)


Top ↑

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;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.10.1 Fixed typo preventing one-time orders from adding to revenue.
3.32.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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