WordPress at Your Fingertips
function is not described

WC_Abstract_Legacy_Product::get_display_price() public WC 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.

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

No Hooks.




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


Deprecated Since 3.0.0 Use wc_get_price_to_display instead.

Code of WC_Abstract_Legacy_Product::get_display_price() WC 5.6.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 ) );