Quantcast
Channel: WordPress.org Forums » [WooCommerce] Support
Viewing all articles
Browse latest Browse all 104029

terrytsang on "[Plugin: WooCommerce - excelling eCommerce] How to put ,- after the price woocommerse"

$
0
0

Hi, you can paste below code at the bottom of your theme functions.php file:

This will apply changes to product details page only

add_filter( 'woocommerce_get_price_html', 'custom_price_html', 100, 2 );
function custom_price_html( $price, $product ){
    if(is_single() && $price != "")
      $price = $price . ',-';

     return apply_filters( 'woocommerce_get_price', $price );
}

This will apply to all pages and catalog as well:

add_filter( 'woocommerce_get_price_html', 'custom_price_html', 100, 2 );
function custom_price_html( $price, $product ){
    $price = $price . ',-';

    return apply_filters( 'woocommerce_get_price', $price );
}

Viewing all articles
Browse latest Browse all 104029

Trending Articles