LLMS_Admin_Tool_Limited_Billing_Order_Locator::get_txn_count_by_status( LLMS_Order $order, string $status )
Helper to get the number of transactions on an order for a given status.
Parameters Parameters
- $order
-
(LLMS_Order) (Required) The order object.
- $status
-
(string) (Required) Transaction post status to query by.
Return Return
(int) Number of transactions for the requested status.
Source Source
File: includes/admin/tools/class-llms-admin-tool-limited-billing-order-locator.php
protected function get_txn_count_by_status( $order, $status ) { $txns = $order->get_transactions( array( 'per_page' => 1, 'status' => array( $status ), 'type' => array( 'recurring', 'single' ), // If a manual payment is recorded it's counted a single payment and that should count. ) ); return $txns['total']; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.3.0 | Introduced. |