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


Top ↑

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


Top ↑

Return Return

(string)


Top ↑

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 );
		}
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.