WC_Abstract_Legacy_Product::get_display_price()publicWC 1.0

Deprecated from version 3.0.0. It is no longer supported and can be removed in future releases. Use wc_get_price_to_display instead.

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

Method of the class: WC_Abstract_Legacy_Product{}

No Hooks.

Return

String.

Usage

$WC_Abstract_Legacy_Product = new WC_Abstract_Legacy_Product();
$WC_Abstract_Legacy_Product->get_display_price( $price, $qty );
$price(string)
to calculate, left blank to just use get_price()
Default: ''
$qty(int)
passed on to get_price_including_tax() or get_price_excluding_tax()
Default: 1

Changelog

Deprecated since 3.0.0 Use wc_get_price_to_display instead.

WC_Abstract_Legacy_Product::get_display_price() code WC 8.7.0

public function get_display_price( $price = '', $qty = 1 ) {
	wc_deprecated_function( 'WC_Product::get_display_price', '3.0', 'wc_get_price_to_display' );
	return wc_get_price_to_display( $this, array( 'qty' => $qty, 'price' => $price ) );
}