WC_Order::add_order_item_totals_refund_rows( array $total_rows, string $tax_display )
Add total row for refunds.
Description Description
Parameters Parameters
- $total_rows
-
(Required) Total rows.
- $tax_display
-
(Required) Tax to display.
Source Source
File: includes/class-wc-order.php
protected function add_order_item_totals_refund_rows( &$total_rows, $tax_display ) { $refunds = $this->get_refunds(); if ( $refunds ) { foreach ( $refunds as $id => $refund ) { $total_rows[ 'refund_' . $id ] = array( 'label' => $refund->get_reason() ? $refund->get_reason() : __( 'Refund', 'woocommerce' ) . ':', 'value' => wc_price( '-' . $refund->get_amount(), array( 'currency' => $this->get_currency() ) ), ); } } }