Skip to content

Commit

Permalink
Fix $key
Browse files Browse the repository at this point in the history
  • Loading branch information
octaedro committed Jun 7, 2023
1 parent 3fbaaa9 commit da5ab47
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -168,7 +168,6 @@ public function get_main_chart() {
'shipping_tax_amount' => 0,
'total_orders' => 0,
);
$unique_post_ids[ $tax_row->post_id ] = true;
$tax_rows[ $key ]->tax_rate = $tax_row->tax_rate;
$tax_rows[ $key ]->tax_amount += wc_round_tax_total( $tax_row->tax_amount );
$tax_rows[ $key ]->shipping_tax_amount += wc_round_tax_total( $tax_row->shipping_tax_amount );
Expand All @@ -180,7 +179,7 @@ public function get_main_chart() {
}

foreach ( $tax_rows_full_refunds as $tax_row ) {
$key = $tax_row->rate_id;
$key = $tax_row->tax_rate;
$tax_rows[ $key ] = isset( $tax_rows[ $key ] ) ? $tax_rows[ $key ] : (object) array(
'tax_amount' => 0,
'shipping_tax_amount' => 0,
Expand Down

0 comments on commit da5ab47

Please sign in to comment.