Tribe__Tickets_Plus__Commerce__WooCommerce__Orders__Table::column_total( $item )

Handler for the total column


Parameters

$item

(Required)


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/Commerce/WooCommerce/Orders/Table.php

	public function column_total( $item ) {
		$total = 0;
		foreach ( $this->valid_order_items[ $item['id'] ] as $line_item ) {
			$total += (float) $line_item['subtotal'];
			if ( self::item_has_discount( $line_item ) ) {
				$total -= self::item_get_discount( $line_item );
			}
		}

		if ( self::$pass_fees_to_user ) {
			$total += $this->calc_site_fee( $total );
		}

		$post_id = Tribe__Utils__Array::get_in_any( array( $_GET, $_REQUEST ), 'event_id', null );

		return tribe_format_currency( number_format( $total, 2 ), $post_id );
	}//end column_total