Support » Plugin: WooCommerce » Changing "From Price" to maximum price.

  • Resolved morgyface

    (@morgyface)


    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.

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • So a certain wonderful person has helped me resolve this. The following code needs adding to your themes function.php file.

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

    How wonderful.

    Thanks

    thanks for sharing. )

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing "From Price" to maximum price.’ is closed to new replies.