WC_Product_Variable::get_price_suffix()
Get the suffix to display after prices > 0.
This is skipped if the suffix has dynamic values such as {price_excluding_tax} for variable products.
Метод класса: WC_Product_Variable{}
Хуки из метода
Возвращает
Строку
.
Использование
$WC_Product_Variable = new WC_Product_Variable(); $WC_Product_Variable->get_price_suffix( $price, $qty );
- $price(строка)
- Price to calculate, left blank to just use get_price().
По умолчанию: '' - $qty(int)
- Quantity passed on to get_price_including_tax() or get_price_excluding_tax().
По умолчанию: 1
Заметки
- Смотрите: get_price_html for an explanation as to why.
Код WC_Product_Variable::get_price_suffix() WC Product Variable::get price suffix WC 8.7.0
public function get_price_suffix( $price = '', $qty = 1 ) { $suffix = get_option( 'woocommerce_price_display_suffix' ); if ( strstr( $suffix, '{' ) ) { return apply_filters( 'woocommerce_get_price_suffix', '', $this, $price, $qty ); } else { return parent::get_price_suffix( $price, $qty ); } }