Site icon Experience Wordpress Developer Online – Design Develop and Maintenance Support

How to Display Regular/Sale Price in the Woocommerce Cart

Sale prices are the most used marketing technique in the world. Its no secret that a good discount on a product can push the customer over the edge of buying the product they wanted to have for a long time, or make the decision easier when they see the discounted product coming by.

By default WooCommerce displays regular price (Provided there is no sale price available) or Sale Price with striked regular price on Shop and Single Product pages.

But if you would like to Display Regular/Sale Price in the Woocommerce Cart. here is a simple method to achieve this. Let’s see.

Add this following line of code at the end of your theme’s functions.php file of your active child theme (or theme) and Save the file.

   function show_regularsale_price_at_cart( $old_display, $cart_item, $cart_item_key ) {
	$product = $cart_item['data'];
	if ( $product ) {
		return $product->get_price_html();
	}
	return $old_display;
     }
    add_filter( 'woocommerce_cart_item_price', 'show_regularsale_price_at_cart', 10, 3 );
Exit mobile version