Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

WC_Report_Sales_By_Date::round_chart_totals( array|string $amount )

Round our totals correctly.


Description Description


Parameters Parameters

$amount

(Required) Chart total.


Top ↑

Return Return

(array|string)


Top ↑

Source Source

File: includes/admin/reports/class-wc-report-sales-by-date.php

	private function round_chart_totals( $amount ) {
		if ( is_array( $amount ) ) {
			return array( $amount[0], wc_format_decimal( $amount[1], wc_get_price_decimals() ) );
		} else {
			return wc_format_decimal( $amount, wc_get_price_decimals() );
		}
	}


Top ↑

User Contributed Notes User Contributed Notes

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