Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Woocommerce Cart Showing Duplicate Cart Totals

I have a website running woocommerce and on the cart page it's showing 2 cart totals at the checkout. I'm not seeing where anyone has even posted about this anywhere so it seems really random. Any ideas?

My quick fix was to just hide the second one using css.

like image 933
Tell Stevens Avatar asked Dec 15 '22 15:12

Tell Stevens


1 Answers

The function call in the template got removed, added back via an action. Every theme overwriting this template will still have the original function call, as well as the function added via the action. This shouldn't be pushed in a fix release like this, in my humble opinion. But now it's there, let's resolve this. Resolving the issue

Resolving this issue is actually fairly easy. Your theme will have the cart/cart.php overwritten in the woocommerce folder of your (child) theme. In there, you will find this line (or at least something similar calling that same function):

<?php woocommerce_cart_totals(); ?>

You need to remove this line from your overwritten template file and your cart totals should only appear once.

like image 66
Vin Avatar answered Jan 03 '23 13:01

Vin