• Resolved ensalock

    (@ensalock)


    How do I remove the subtotal field with CSS? The following code is not working:

    th.td.tlabel-subtotal, td.td.tvalue-subtotal {
        display: none;
    }

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • hannah

    (@hannahritner)

    Hi @ensalock,
    Thanks for reaching out! Where are you adding that CSS? Have you cleared your cache after adding?

    Kindly,
    Hannah

    Thread Starter ensalock

    (@ensalock)

    Hey Hannah,
    thanks for your support! Yes, I cleared my cache. No changing. But I found a filter, that removes the subtotal field from the e-mails. The code goes to functions.php:

    add_filter( 'woocommerce_get_order_item_totals', 'adjust_woocommerce_get_order_item_totals' );
    
    function adjust_woocommerce_get_order_item_totals( $totals ) {
      unset($totals['cart_subtotal']  );
      return $totals;
    }

    Cheers!

    hannah

    (@hannahritner)

    Glad to hear it! Let us know if there’s anything else we can help you with.

    Best,
    Hannah

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Subtotal’ is closed to new replies.