[Решено] How can I hide the 'Subtotal' column (WooCommerce) using CSS?

  

3
Топик стартер

I have a WooCommerce site and I've installed a plugin for generating coupons - BUT on the cart and checkout page it doesn't refresh the Subtotal information.

So, how can I hide the 'Subtotal' column (including the header and values) in the WooCommerce cart table using CSS?

1 Ответ
2

To hide or remove the "Subtotal" text and the corresponding amount, you can use the following CSS code (insert it in your Child's theme):

/* Hide the subtotal row in the cart */
.woocommerce-cart-form .product-subtotal {
    display: none !important;
}

/* Hide the "Subtotal" header in the table */
.shop_table th.product-subtotal {
    display: none !important;
}

/* Hide the subtotal column content */
.shop_table td.product-subtotal {
    display: none !important;
}
  • .woocommerce-cart-form .product-subtotal: Targets all subtotal cells (data and headers) to ensure they are hidden.
  • .shop_table th.product-subtotal: Specifically hides the "Subtotal" header in the table.
  • .shop_table td.product-subtotal: Hides the subtotal values in the table rows.
Поделиться: