Support » Plugins and Hacks » WooCommerce » How to put ,- after the price woocommerse

How to put ,- after the price woocommerse

  • Hello WooCommerce users.

    first of all I think its a great store add on for wordpress.

    so mi question is can anyone tell me how I can get ,- after all the prices in my store. I think that I need some string or code to put in a scrip php or css but I am searching now for more then 2 weeks and I can not find it so please is there somebody who can tell me watt string or code to put where.

    I really be great full to the person that can tell me how to establish it.
    thanks in advanced


Viewing 4 replies - 1 through 4 (of 4 total)
  • 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 );

    Hello terrytsang.

    You are my hero thanks. can I ask you another question.

    when you look at this url http://www.romanza.nl/product-categorie/grafmonumenten/

    you see at the left the menu when u push on the product categories the menu stays the same but not when u push on the categories zandstralen-inwendig
    then all the menus are showing
    is the explanation also simple for you to tell me I hope so.

    I am really happy that you helpt me whit my first question another big thanks for you.

    greetings from the netherlands

    Hello atoompjenl, glad the previous tips worked.

    Anyway, for your 2nd question, i think it is related to your sidebar widget that display product categories list based on the level of category. You can have a look at the code for generating sidebar product category list.


    I think this “add_filter” code is close to what I need to solve my problem, but still need a little help –
    woocommerce_get_price_html seems to retrieve both the regular price and the sale price and outputs them side by side (with regular price having a strikethrough) – how can I move the regular price below the sale price?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to put ,- after the price woocommerse’ is closed to new replies.
Skip to toolbar