WC_Product_Variable::get_price_suffix( string $price = '', integer $qty = 1 )
Get the suffix to display after prices > 0.
Description Description
This is skipped if the suffix has dynamic values such as {price_excluding_tax} for variable products.
See also See also
- get_price_html: for an explanation as to why.
Parameters Parameters
- $price
-
(Optional) Price to calculate, left blank to just use get_price().
Default value: ''
- $qty
-
(Optional) Quantity passed on to get_price_including_tax() or get_price_excluding_tax().
Default value: 1
Return Return
(string)
Source Source
File: includes/class-wc-product-variable.php
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 ); } }