[resolved] Price not showing when variations have the same price (3 posts)

  1. jepser
    Posted 3 years ago #

    I'm using variation type product, in this site:

    But the prices are not showing, all of them are the same, but when I change one of the prices, it shows the prices for any selection.

    Do anyone know why is this happen?


  2. bheadrick
    Posted 3 years ago #

    it's supposed to display something like "from (lowest price" above the selection, but I guess your theme has that part removed. When all the prices are the same the "from" text is not displayed, and it just shows the price as there's no need to change the displayed price depending on the options selected when they're all the same, the price in the lower spot never gets displayed.

    Problem is essentially with your theme.

  3. jepser
    Posted 3 years ago #

    Nope, I tried with the default theme on another wp installation, anyway, I changed line 1524 of class-wc-product.php

    From this:
    'price_html'=> $this->min_variation_price != $this->max_variation_price ? '<span class="price">' . $variation->get_price_html() . '</span>' : '',

    To this:
    'price_html' => '<span class="price">' . $variation->get_price_html() . '</span>'

    It will be useful if they put it as an option in the admin panel.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic