LLMS_Analytics::get_total_sales( [array] $orders )
Get total volume sold
Description Description
Parameters Parameters
- $orders
-
([array]) (Required) [array of order objects]
Return Return
([float]) [total sold]
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; }
Expand full source code Collapse full source code View on GitHub