WordPress at a glance
function is not described

WC_Order::get_total_refunded_for_item() public WC 1.0

Get the refunded amount for a line item.

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

No Hooks.

Return

Int.

Usage

$WC_Order = new WC_Order();
$WC_Order->get_total_refunded_for_item( $item_id, $item_type );
$item_id(int) (required)
ID of the item we're checking.
$item_type(string)
Type of the item we're checking, if not a line_item.

Code of WC_Order::get_total_refunded_for_item() WC 5.0.0

<?php
public function get_total_refunded_for_item( $item_id, $item_type = 'line_item' ) {
	$total = 0;
	foreach ( $this->get_refunds() as $refund ) {
		foreach ( $refund->get_items( $item_type ) as $refunded_item ) {
			if ( absint( $refunded_item->get_meta( '_refunded_item_id' ) ) === $item_id ) {
				$total += $refunded_item->get_total();
			}
		}
	}
	return $total * -1;
}