WC_Report_Sales_By_Date::round_chart_totals()privateWC 1.0

Round our totals correctly.

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

No Hooks.

Return

Array|String.

Usage

// private - for code of main (parent) class only
$result = $this->round_chart_totals( $amount );
$amount(array|string) (required)
Chart total.

Code of WC_Report_Sales_By_Date::round_chart_totals() WC 6.7.0

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() );
	}
}