WordPress at Your Fingertips
function is not described

WC_Abstract_Order::get_formatted_line_subtotal() public WC 1.0

Gets line subtotal - formatted for display.

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

Return

String.

Usage

$WC_Abstract_Order = new WC_Abstract_Order();
$WC_Abstract_Order->get_formatted_line_subtotal( $item, $tax_display );
$item(object) (required)
Item to get total from.
$tax_display(string)
Incl or excl tax display mode.
Default: ''

Code of WC_Abstract_Order::get_formatted_line_subtotal() WC 5.8.0

public function get_formatted_line_subtotal( $item, $tax_display = '' ) {
	$tax_display = $tax_display ? $tax_display : get_option( 'woocommerce_tax_display_cart' );

	if ( 'excl' === $tax_display ) {
		$ex_tax_label = $this->get_prices_include_tax() ? 1 : 0;

		$subtotal = wc_price(
			$this->get_line_subtotal( $item ),
			array(
				'ex_tax_label' => $ex_tax_label,
				'currency'     => $this->get_currency(),
			)
		);
	} else {
		$subtotal = wc_price( $this->get_line_subtotal( $item, true ), array( 'currency' => $this->get_currency() ) );
	}

	return apply_filters( 'woocommerce_order_formatted_line_subtotal', $subtotal, $item, $this );
}