wc_price filters suggested in #5664

Closes #5664
This commit is contained in:
Mike Jolley 2014-07-11 16:12:59 +01:00
parent 0ed0a41a04
commit 822d477f72
1 changed files with 3 additions and 2 deletions

View File

@ -328,13 +328,14 @@ function wc_price( $price, $args = array() ) {
$price = wc_trim_zeros( $price );
}
$return = '<span class="amount">' . sprintf( get_woocommerce_price_format(), $currency_symbol, $price ) . '</span>';
$formatted_price = sprintf( get_woocommerce_price_format(), $currency_symbol, $price );
$return = '<span class="amount">' . $formatted_price . '</span>';
if ( $ex_tax_label && get_option( 'woocommerce_calc_taxes' ) == 'yes' ) {
$return .= ' <small>' . WC()->countries->ex_tax_or_vat() . '</small>';
}
return $return;
return apply_filters( 'wc_price', $return, $price, $args );
}
/**