How to Remove Price from Cart In WooCommerce

woocommerce remove price from cartOne of the most common requests I get from clients on WooCommerce customization is to remove or hide prices. In particular hiding price from the cart page is a common request.

Today, I would like to share with you how you can remove or hide prices from the cart in your WooCommerce store.

If you are looking for a quick solution to remove price from the cart in WooCommerce, my recommendation and the code snippet below should help you get this done quickly.

WooCommerce Remove Price from Cart

When you install WooCommerce by default the price is displayed on the cart page in a column as shown in the image below. To remove this column of price in the WooCommerce cart page, you can use two methods :

remove price from cart page woocommerce _1

  • Add a code snippet that removes the price column from the cart page
  • Use an existing plugin that implements this feature to remove the price from the WooCommerce page 

Let us look at the first method of how to remove price from the WooCommerce cart page.

Using Code Snippet to Remove Price from Cart

Code snippets are provided by WooCommerce developers as a quick way to remove or hide features in WooCommerce. Using code snippets is an ideal way to customize WooCommerce but comes with the risks of breaking your site.

The best way to use code snippet is to apply the code snippet in the child theme.  Adding the code snippet to the parent theme will result in the loss of the changes when the parent theme has been updated in the future.

The following is the code snippet that you can add to your child them functions.php; to remove the price from the cart page as shown in the image below :

function storemizer_custom_styles() {
$StoremizerStyles = '<style id="storemizer-styles" type="text/css" media="screen">';
$StoremizerStyles .= '
.product-price{
display: none !important;
}
';
$StoremizerStyles .= '</style>';
echo $StoremizerStyles;
}

add_action('wp_head', 'storemizer_custom_styles');

This code adds a rule to remove the column using CSS. It sets the display to none and the column is removed as shown in the image below :

woocommerce remove price from cart _2