woocommerce_get_price_suffix

woocommerce_get_price_suffix

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_get_price_suffix') is found 2 times:

  • /includes/abstracts/abstract-wc-product.php line 2112
    				'{price_excluding_tax}' => wc_price( wc_get_price_excluding_tax( $this, array( 'qty' => $qty, 'price' => $price ) ) ), // @phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound
    			);
    			$html         = str_replace( array_keys( $replacements ), array_values( $replacements ), ' <small class="woocommerce-price-suffix">' . wp_kses_post( $suffix ) . '</small>' );
    		}
    		return apply_filters( 'woocommerce_get_price_suffix', $html, $this, $price, $qty );
    	}
    
    	/**
    	 * Returns the availability of the product.
    	 *
    	 * @return string[]
    
  • /includes/class-wc-product-variable.php line 202
    	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 );
    		}
    	}
    
    	/**