LLMS_Analytics::get_total_coupons_used( [array] $orders )

Get number of coupons used


Description Description


Parameters Parameters

$orders

([array]) (Required) [array of order objects]


Top ↑

Return Return

([int]) [total number of coupons used]


Top ↑

Source Source

File: includes/class.llms.analytics.php

	public static function get_total_coupons_used( $orders ) {

		$coupons = 0;

		if ( $orders ) {

			foreach ( $orders as $order ) {

				if ( ! empty( $order->coupon_id ) ) {
					$coupons++;
				}
			}
		}

		return $coupons;
	}


Top ↑

User Contributed Notes User Contributed Notes

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