WordPress at a glance
function is not described

wc_get_price_to_display() WC 3.0.0

Returns the price including or excluding tax, based on the 'woocommerce_tax_display_shop' setting.

No Hooks.

Return

float.

Usage

wc_get_price_to_display( $product, $args );
$product(WC_Product) (required)
WC_Product object.
$args(array)
Optional arguments to pass product quantity and price.

Changelog

Since 3.0.0 Introduced.

Code of wc_get_price_to_display() WC 5.0.0

<?php
function wc_get_price_to_display( $product, $args = array() ) {
	$args = wp_parse_args(
		$args,
		array(
			'qty'   => 1,
			'price' => $product->get_price(),
		)
	);

	$price = $args['price'];
	$qty   = $args['qty'];

	return 'incl' === get_option( 'woocommerce_tax_display_shop' ) ?
		wc_get_price_including_tax(
			$product,
			array(
				'qty'   => $qty,
				'price' => $price,
			)
		) :
		wc_get_price_excluding_tax(
			$product,
			array(
				'qty'   => $qty,
				'price' => $price,
			)
		);
}