WC_Abstract_Legacy_Product::get_display_price()
Устарела с версии 3.0.0. Больше не поддерживается и может быть удалена. Используйте wc_get_price_to_display.
Returns the price including or excluding tax, based on the 'woocommerce_tax_display_shop' setting.
Метод класса: WC_Abstract_Legacy_Product{}
Хуков нет.
Возвращает
Строку
.
Использование
$WC_Abstract_Legacy_Product = new WC_Abstract_Legacy_Product(); $WC_Abstract_Legacy_Product->get_display_price( $price, $qty );
- $price(строка)
- to calculate, left blank to just use get_price()
По умолчанию: '' - $qty(int)
- passed on to get_price_including_tax() or get_price_excluding_tax()
По умолчанию: 1
Список изменений
Устарела с 3.0.0 | Use wc_get_price_to_display instead. |
Код WC_Abstract_Legacy_Product::get_display_price() WC Abstract Legacy Product::get display price WC 7.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 ) ); }