WordPress at Your Fingertips
function is not described

WC_Order::add_order_item_totals_refund_rows() protected WC 1.0

Add total row for refunds.

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

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->add_order_item_totals_refund_rows( $total_rows, $tax_display );
$total_rows(array) (required) (passed by reference — &)
Total rows.
$tax_display(string) (required)
Tax to display.

Code of WC_Order::add_order_item_totals_refund_rows() WC 5.7.1

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