WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Notes

NewSalesRecord::sum_sales_for_date() public WC 1.0

Returns the total of yesterday's sales.

{} It's a method of the class: NewSalesRecord{}

No Hooks.

Return

floatval. Nothing.

Usage

$result = NewSalesRecord::sum_sales_for_date( $date );
$date(string) (required)
Date for sales to sum (i.e. YYYY-MM-DD).

Code of NewSalesRecord::sum_sales_for_date() WC 5.2.2

<?php
public static function sum_sales_for_date( $date ) {
	$order_query = new \WC_Order_Query( array( 'date_created' => $date ) );
	$orders      = $order_query->get_orders();
	$total       = 0;

	foreach ( (array) $orders as $order ) {
		$total += $order->get_total();
	}

	return $total;
}