LLMS_Analytics::get_total_sales( [array] $orders )

Get total volume sold


Description Description


Parameters Parameters

$orders

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


Top ↑

Return Return

([float]) [total sold]


Top ↑

Source Source

File: includes/class.llms.analytics.php

	public static function get_total_sales( $orders ) {

		$total_sold = 0;

		if ( $orders ) {

			foreach ( $orders as $order ) {

				$total_sold += $order->order_total;

			}
		}
		return $total_sold;
	}


Top ↑

User Contributed Notes User Contributed Notes

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