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


Description Description


Parameters Parameters

$num_orders

(int) (Optional) number of orders to retrieve

Default value: 1

$dates

(array) (Optional) date range (passed to WP_Query['date_query'])

Default value: array()


Top ↑

Return Return

(obj)


Top ↑

Source Source

File: includes/class.llms.course.data.php

	private function orders_query( $num_orders = 1, $dates = array() ) {

		$args = array(
			'post_type'      => 'llms_order',
			'post_status'    => array( 'llms-active', 'llms-complete' ),
			'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
3.15.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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





Permalink: