BLACK
Upto 80% OFF
Limited time sale
FRIDAY

Ends in

Days
Hours
Minutes
Seconds
Hide Cart Subtotal In WooCommerce

Hide cart subtotal field in woo-commerce cart page?

Share This Post...

 There are many ways by which you can Hide cart subtotal field in woo-commerce cart page. It is a very simple and straightforward process that you can implement on your WordPress website.

Approach 1:  Using CSS

You can go to the inspect element tool in the web browser to access the div that shows this field, after selecting the div to apply the display property to none.

Go to Dashboard >> Appearance >> Customize >> Additional CSS

Now you just have to add this line of code to your themes additional CSS.

CSS
.cart-subtotal {

      display: none;

}

Or, you can also use the visibility property as shown below in the code:

.cart-subtotal {

      visibility: hidden;

}

woo-commerce cart page

This will hide the cart subtotal field, but to remove it permanently you need to add a hook.

Approach 2: Remove subtotal by the filter hook

To remove this field permanently from the website you just need to add this code of snippet to the functions.php file.

Go to appearance >> Theme editor >> Functions.php

1) Remove cart totals:

PHP
// On cart page

add_action( 'woocommerce_cart_collaterals', 'remove_cart_totals', 9 );

function remove_cart_totals(){

    // Remove cart totals block

    remove_action( 'woocommerce_cart_collaterals', 'woocommerce_cart_totals', 10 );

    // Add back "Proceed to checkout" button (and hooks)

    echo '<div class="cart_totals">';

    do_action( 'woocommerce_before_cart_totals' );

    echo '<div class="wc-proceed-to-checkout">';

    do_action( 'woocommerce_proceed_to_checkout' );

    echo '</div>';

    do_action( 'woocommerce_after_cart_totals' );

    echo '</div><br clear="all">';

}

woo-commerce cart page image 2

2) Remove checkout totals:

PHP
// On checkout page

add_action( 'woocommerce_checkout_order_review', 'remove_checkout_totals', 1 );

function remove_checkout_totals(){

    // Remove cart totals block

remove_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 10 );

}
Share This Post...
Table of Content
Days
Hours
Minutes
Seconds
Translation Addons Bundle
Annual Subscription For 1 Website
$x
$x
/ 1 Year
0% Discount Applied
Renew Yearly

1 year subscription of plugin updates and premium support.

POPULAR
Translation Addons Bundle
Lifetime Subscription For 1 Website
$x
$x
/ One Time
0% Discount Applied

Pay once and get lifetime plugin updates and premium support.

🔥 Limited-Time Discount Offer! Ending in:
Days
Hours
Minutes
Seconds
Money Back Guarantee
0 Days
Active Installs
0 +
5 Star Reviews
0 +
wait... we have a special
Bundle Discount for You!
UP TO
80%
DISCOUNT
Hurry! This limited-time deal will end soon.
28800