Show Regular & Sale Prices in WooCommerce Cart

Want to show both the original (regular) and discounted (sale) prices in the WooCommerce cart? Use the woocommerce_cart_item_price filter to do this easily.

Step 1: Go to your theme’s functions.php file.

Step 2: Paste this code into the file:

// Show regular and sale prices in cart table
function modify_cart_item_price($product_price, $cart_item, $cart_item_key) {
    $product = $cart_item['data'];

    if ($product->is_on_sale()) {
        $regular_price = wc_price($product->get_regular_price());
        $sale_price = wc_price($product->get_price());

        $product_price = '<del>' . $regular_price . '</del> <ins>' . $sale_price . '</ins>';
    }

    return $product_price;
}
add_filter('woocommerce_cart_item_price', 'modify_cart_item_price', 10, 3);

Step 3: Save and upload the updated file.

Now, your cart table will display the regular price as a strikethrough and the sale price as highlighted. This visual cue helps customers clearly see the savings.

If you’re using a custom cart template, some CSS or template adjustments may be needed.

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.