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:

woocommerce-2.3.8-duplicated-totals-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:

woocommerce_cart_totals();

which will likely be toward the end of the file:

cart-code-screenshot

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:

cart-code-screenshot-commented

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.

28 Comments
  1. Worked for me. It’s only displaying one sum on their. But same is the problem with checkout page with paypal payment

  2. thanks for the quick fix!

  3. Thanks!!! it works for me.

  4. Hey, thank you verry much! Works fine.

  5. Thank you Works perfect, after 2 hours try to fix.

  6. 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.

  7. thank you. u r wonderfull. thanks alot

  8. 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?

    thanks,
    Sulaiman.

    • 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…

  9. 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?

  10. I can’t find it… I’m using Genesis with a Childtheme Admire. Do you know a workaround?

  11. THANK YOU SO MUCH! Solved!
    You made my day ๐Ÿ˜‰
    Best,
    Dan

  12. 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! ๐Ÿ™‚

  13. I’m still getting this problem.

    woocommerce_cart_totals(); no longer exists.

  14. i’m having the same problem with my site. i’m using avada theme

    • This problem was for an old version of Woocommerce. I would jsut ensure you’re using the lastest version that is compatible with your theme (almost certain to be v3.x.x+) and that your theme is up to date too. i haven’t heard of this problem on later versions (which is why this is quite an old thread)…

  15. Hi. I know this is an old thread, but I, too, am having this issue. I’m using the Bulk theme (up to date), Elementor page builder (up to date), and latest version of Woocommerce, 3.3.3.

    • Never mind! After making it way more difficult than it needed to be- for example, searching through all of the code… I realized the cart widget was duplicated on the right sidebar!

      • Glad you got it sorted. I havenโ€™t come across this problem on the latest versions of WC and anything similar is usually caused by something else.

Leave a Reply

Call Us Today

Chat About What You Want...

  • Website Design
  • Search Engine Optimisation
  • Web Hosting & Management
  • Advertising - PPC/Google Adwords Management

Call Us: 033 33 55 99 08

Address

16 Beargarden Road, Banbury
OX16 9PH, UK
+44 (0) 33 33 55 99 08
+44 (0) 1295 236 111
http://www.aardvarky.com
info@aardvarky.com

How To Find Us

Cart