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


(LLMS_Order) (Required) The order object.


(string) (Required) Transaction post status to query by.

Top ↑

Return Return

(int) Number of transactions for the requested status.

Top ↑

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(
				'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'];


Top ↑

Changelog Changelog

Version Description
5.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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