Back to Community

How to Hide Variable Product Price Ranges in WooCommerce

6 threads Sep 30, 2025 PluginWoocommerce

Content

Many WooCommerce store owners who offer bulk discounts encounter an unexpected display issue: their product pages show price ranges like "$239-$400" instead of a single, clean price. This happens automatically when WooCommerce detects variable pricing on a product, and it can sometimes make your deals appear confusing to customers who haven't yet seen the full context.

This price range display is WooCommerce's default behavior for variable products and products with bulk pricing rules. While functional, it might not always present your pricing in the most appealing way, especially when you want to reveal special bulk pricing only after a customer engages with the product.

Solution: Remove the Price Range with Custom Code

The most reliable way to hide these price ranges is by adding a small code snippet to your site. This method gives you full control over the price display without affecting your actual pricing structure.

Add the following PHP code to your theme's functions.php file or use a code snippets plugin:

add_filter('woocommerce_variable_price_html', 'custom_variable_price_format', 10, 2);

function custom_variable_price_format($price, $product) {
    // Get the minimum and maximum prices
    $min_price = $product->get_variation_price('min');
    $max_price = $product->get_variation_price('max');

    // Return only the minimum price
    return wc_price($min_price);
}

This code will replace the price range with just the lowest available price (in your case, €239). The bulk pricing of €400 for two tickets will still appear once customers select quantities or proceed to checkout.

Alternative Approach: Use a Custom Function for More Control

If you need more granular control, this enhanced version lets you customize the output further:

function hide_variable_price_range($price, $product) {
    if ($product->is_type('variable')) {
        $min_price = $product->get_variation_price('min', true);
        $max_price = $product->get_variation_price('max', true);
        
        if ($min_price !== $max_price) {
            // Return only the starting price
            $price = wc_price($min_price);
        }
    }
    return $price;
}
add_filter('woocommerce_get_price_html', 'hide_variable_price_range', 10, 2);

Important Considerations

Before implementing this solution:

  • Backup Your Site: Always create a backup before adding custom code
  • Child Theme: If adding to functions.php, use a child theme to prevent losing changes during theme updates
  • Test Thoroughly: Verify that the pricing displays correctly on all product types and that your bulk discounts still work as expected

This approach maintains your bulk discount functionality while presenting a cleaner initial price display to potential customers. The special pricing will only become visible when customers interact with the quantity selector or view the cart, creating a more controlled shopping experience.