woocommerce_get_price_suffix

woocommerce_get_price_suffix

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

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_get_price_suffix') is found 2 times:

  • /includes/abstracts/abstract-wc-product.php line 2216
    2212
    2213
    2214
    2215
    2216
    2217
    2218
    2219
    2220
    2221
    2222
                '{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 207
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    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 );
        }
    }
     
    /**