Support » Plugins and Hacks » Edit the pricing section of a product Woocommerce

Edit the pricing section of a product Woocommerce

  • Hi,

    I would like to be able to edit my ‘pricing’ details on my product page.
    Right now, when I create my product through Woocommerce, it is set up so that the price is shown with the $ sign in front of it.


    Due to certain restrictions, I need to have a little ‘asterisk’ next to the price with a note at the bottom of the page, but I can’t figure out how to add it.

    Of course I tried adding the * directly next to the price, but the template won’t save it.
    Right now it says ‘$9.50’ and I want it to say “$9.50*”

    Any help will be more than welcome! 🙂


Viewing 8 replies - 1 through 8 (of 8 total)
  • Not sure what you mean by “the template won’t save it”. The best way to do this is to edit the theme. Go to your woocommerce plugin and copy the price.php (there is one in loop and single-product file) and add them to your theme. Once both price files are copied you can simply edit them.

    If for some really strange reason that does not work you could try filter the price.

    add_filter('woocommerce_price_html', 'my_price_edit');
    function my_price_edit() {
      $product = new WC_Product( get_the_ID() );
      $price = $product->price;
      echo "$" . $price . "*";

    Place that code in your functions.php and it should edit the price. Like I said the best way to do this is to actually edit the price files tho.

    Thank you for your answer. I’m not very familiar with php, qhat do you mean by ‘add them to your theme’?

    I found both price.php files but I don’t really know what to do with them…

    Read up on how to override woocommerce template files via your theme here. http://docs.woothemes.com/document/template-structure/

    The reason for doing this is if you simply edit the price.php when woocommerce updates your changes will be lost. That is why you have price.php in your theme to allow the plugin to update but still keep your edits safe in your own price.php.

    Ok I did copy these files in the /mytheme/woocommerce/… (in my ftp) but for some reasons, it removed the price from my page…
    Now I just deleted these files I just added, but I still can’t see my prices anymore, still – what should I do?

    Did you copy the files over or remove them from the plugin and add them to your theme? They need to still be in the plugin and in your theme.

    I just copied them. I did not remove anything…

    Looks like all my pricing was deleted!

    As in deleted from the database? This makes no sense.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Edit the pricing section of a product Woocommerce’ is closed to new replies.