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
Description Description
Parameters Parameters
- $status
-
(array|string) (Optional) filter by status (see transaction statuses)
Default value: 'llms-txn-succeeded'
- $type
-
(array|string) (Optional) filter by type [recurring|single|trial]
Default value: 'any'
- $format
-
(string) (Optional) date format of the return
Default value: 'Y-m-d H:i:s'
Return Return
(string|false) date or false if none found
Source Source
File: includes/models/model.llms.order.php
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; } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: