LLMS_Order::get_last_transaction_date( array|string $status = 'llms-txn-succeeded', array|string $type = 'any', string $format = 'Y-m-d H:i:s' )

Retrieve the date of the last (most recent) transaction

Parameters Parameters


(array|string) (Optional) Filter by status (see transaction statuses). Default is 'llms-txn-succeeded'.

Default value: 'llms-txn-succeeded'


(array|string) (Optional) Filter by type [recurring|single|trial]. By default looks for any type.

Default value: 'any'


(string) (Optional) Date format of the return. Default is 'Y-m-d H:i:s'.

Default value: 'Y-m-d H:i:s'

Top ↑

Return Return

(string|false) Date or false if none found.

Top ↑

Source Source

File: includes/models/model.llms.order.php

	 * @return string|false Date or false if none found.
	public function get_last_transaction_date( $status = 'llms-txn-succeeded', $type = 'any', $format = 'Y-m-d H:i:s' ) {
		$txn = $this->get_last_transaction( $status, $type );
		if ( $txn ) {
			return $txn->get_date( 'date', $format );
		} else {
			return false;

Top ↑

Changelog Changelog

Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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