WordPress at Your Fingertips
function is not described

WC_Product_Variable::get_price_suffix() public WC 1.0

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.

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

Hooks from the method

Return

String.

Usage

$WC_Product_Variable = new WC_Product_Variable();
$WC_Product_Variable->get_price_suffix( $price, $qty );
$price(string)
Price to calculate, left blank to just use get_price().
Default: ''
$qty(int)
Quantity passed on to get_price_including_tax() or get_price_excluding_tax().
Default: 1

Notes

  • See: get_price_html for an explanation as to why.

Code of WC_Product_Variable::get_price_suffix() WC 5.8.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 );
	}
}