WooCommerce - excelling eCommerce
[resolved] Changing "From Price" to maximum price. (4 posts)

  1. morgyface
    Posted 2 years ago #

    Hello, clever people whom I will love forever if you can help me resolve this...

    Basically my clients site sells fabric by the meter. She also sells samples at a much cheaper price. This means that the product displays "From: Lower Price". I want it to display the maximum price.

    This bit of code nearly resolves this by displaying "From: min-price to max-price". Though all I need is the max-price bit.

    If anyone can help me fix this I will be so pleased I'll hug a pensioner and run down the street shouting about love.


  2. morgyface
    Posted 2 years ago #

    So a certain wonderful person has helped me resolve this. The following code needs adding to your themes function.php file.

    'custom_variation_price', 10, 2);
    function custom_variation_price( $price, $product ) {
    $price = '';
    $price .= woocommerce_price($product->max_variation_price);
    return $price;

    How wonderful.

  3. transphoners
    Posted 2 years ago #


  4. PMorgan
    Posted 2 years ago #

    thanks for sharing. )

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic