Warning: This method has been deprecated. Use wc_get_price_to_display instead.
WC_Abstract_Legacy_Product::get_display_price( string $price = '', integer $qty = 1 )
Returns the price including or excluding tax, based on the ‘woocommerce_tax_display_shop’ setting.
Description Description
Parameters Parameters
- $price
-
(Optional) to calculate, left blank to just use get_price()
Default value: ''
- $qty
-
(Optional) passed on to get_price_including_tax() or get_price_excluding_tax()
Default value: 1
Return Return
(string)
Source Source
File: includes/legacy/abstract-wc-legacy-product.php
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 ) );
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |