Web Design SOLVED: Woocommerce 2.3.8 Double/Duplicated Totals Problem
After updating Woocommerce to v2.3.8 many sites seem to be running into a common problem:
The cart totals are duplicated twice on the basket/cart page, resulting in the following problem:
Without getting technical, the problem is caused by the changes between Woocommerce 2.3.7 & 2.3.8, but it is easily fixed.
The chances are that your WordPress theme is using some override templates which are now ‘out of date’.
Open up either your filemanager in cPanel or your favourite FTP client (Filezilla/YummyFTP etc) and find your theme’s folder.
If you’re not familiar with the WordPress file structure, this can be found in the folder named ‘wp-content’, and then the subfolder ‘themes’:
public_html/wp-content/themes/<your theme folder>
Inside your themes folder, you should find another subfolder named ‘woocommerce’, and you then need to find the sub-sub-folder called ‘cart’:
public_html/wp-content/themes/<your theme folder>/woocommerce/cart/
You then need to find the file called ‘cart.php’ and open it up in your favourite text editor (in the screenshot below, I’m just using Adobe Dreamweaver) where you’re looking for the following line of code:
which will likely be toward the end of the file:
In the above example, it’s on line 143.
You now have two options:
- Delete that line completely
- ‘Comment out’ the line with ‘//’ (shown in the next image)
Line Commented out:
Then, just save your file and your problem should be solved! 🙂
NOTE: If you’re using a child-theme, all of the above applies to the child-theme folders too.
Worked for me. It’s only displaying one sum on their. But same is the problem with checkout page with paypal payment
Usman, do you have a page with an example?
thanks for the quick fix!
You’re welcome, Steven. 🙂
Thanks!!! it works for me.
Hey, thank you verry much! Works fine.
Thank you Works perfect, after 2 hours try to fix.
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):
You need to remove this line from your overwritten template file and your cart totals should only appear once.
thank you. u r wonderfull. thanks alot
Brother, I manage this website through the WP dashboard and don’t know how to get into C Panel.
Is it possible to fix this issue without going to the C Panel / without programming?
Not really. However, the current versions of WC shouldn’t have this problem anymore; this is quite an old problem now. Either way, to get access to your cPanel & FTP etc just ask your hosting provider…
I can only find a cart.php file in /wp-content/plugins/woocommerce/templates/cart/
But it does not have woocommerce_cart_totals(); in the code.
I also searched through all other possible files but cannot find it anywhere?
You’re probably using a newer version of Woocommerce where this problem has since been resolved without the workaround I outlined above.
In later updates, they moved this functionality into the woocommerce_cart_collaterals function. If you’re having problems, it could be that your theme is out of date?
I’m having the same double cart totals problem, and I do not have that line of text in cart.php. My theme and Woocommerce installations are up-to-date and I still see two cart totals… Don’t know what to do. 🙁
You may have a different version of Woocommerce installed (probably a newer version – 2.3.8 is quite old now) so it may not be the same; which version are you using?
Clear, inafemotivr, simple. Could I send you some e-hugs?
I can’t find it… I’m using Genesis with a Childtheme Admire. Do you know a workaround?
This shouldn’t be required anymore. Just update Woocommerce to the latest version.
THANK YOU SO MUCH! Solved!
You made my day 😉
Hi Simon, thanks. It works now.
But still weird. Because I was using the latest version of Woocommerce, after I just updated ones more it worked. :-s
Anyway its working, thanks a lot.
No worries 🙂 I was recently going to stop comments on this post, but people still seem to be running into the problem. Glad it’s sorted! 🙂
I’m still getting this problem.
woocommerce_cart_totals(); no longer exists.
This only applies to older versions of Woocommerce; which version are you having problems with?