WC_Report_Sales_By_Date::round_chart_totals()
Round our totals correctly.
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.
WC_Report_Sales_By_Date::round_chart_totals() WC Report Sales By Date::round chart totals code WC 9.7.1
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() ); } }