Support » Plugin: WooCommerce » Price filter works only when range include most expensive variation

  • damians20171

    (@damians20171)


    Hello,

    my problem is woocommerce product price filter.
    For example – there is a product with variations: lowest variation is 1100 and most expensive is 1519
    This filter show this product only if filter range is set on exactly or something more than 1519.
    I would like to make it working with the lowest variation price.

    Normally under product name woocommerce gives price range that it looks like 1100-1519. I hid in funtions.php the max value visible is only the lowest price.
    Don’t know if this makes any different to the topic problem.

    Code below:

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

    You can see everything on images below.

    https://freeimage.host/i/2oyEE7
    https://freeimage.host/i/2oyTrX
    https://freeimage.host/i/2oyI1t

    Could anybody help me with this?

    Thank you in advance

    The page I need help with: [log in to see the link]

  • The topic ‘Price filter works only when range include most expensive variation’ is closed to new replies.