[2.3] Fix round_chart_totals to deal with arrays

Closes #8077
This commit is contained in:
Mike Jolley 2015-05-05 13:55:56 +01:00
parent 5a92126a39
commit d1d5a489fc
1 changed files with 1 additions and 1 deletions

View File

@ -389,7 +389,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report {
*/ */
private function round_chart_totals( $amount ) { private function round_chart_totals( $amount ) {
if ( is_array( $amount ) ) { if ( is_array( $amount ) ) {
return array_map( array( $this, 'round_chart_totals' ), $amount ); return array( $amount[0], wc_format_decimal( $amount[1], wc_get_price_decimals() ) );
} else { } else {
return wc_format_decimal( $amount, wc_get_price_decimals() ); return wc_format_decimal( $amount, wc_get_price_decimals() );
} }