Sale price formatting not showing

Question

WordPress v5.4.2 | WooCommerce v3.7.1 | Theme: Salient v7.0.8

We have variable products with regular and sale prices set, and both prices display on the product page, however the sale price only has standard formatting, there’s no del-tag. So I assume function wc_format_sale_price is not being called. How can I fix this, or what settings should I check please?

function wc_format_sale_price( $regular_price, $sale_price ) {
    $price = '<del>' . ( is_numeric( $regular_price ) ? wc_price( $regular_price ) : $regular_price ) . '</del> <ins>' . ( is_numeric( $sale_price ) ? wc_price( $sale_price ) : $sale_price ) . '</ins>';
    return apply_filters( 'woocommerce_format_sale_price', $price, $regular_price, $sale_price );
}
0
Nick W 1 year 2020-07-15T10:11:42-05:00 0 Answers 56 views 0

Leave an answer

Browse
Browse