Home Woocommerce won't add my custom fee to the cart total
Reply: 0

Woocommerce won't add my custom fee to the cart total

user1017 Published in June 19, 2018, 4:13 pm

This is a really odd problem. I am using Woocommerce, and have added an option for users to opt out/add shipping insurance on the checkout page. The checkbox is connected to an AJAX function that does what it is supposed to do. The fee gets added just fine. Every time the cart is changed in any way, the fee is removed, re-calculated, and added again to the cart. This part of the code is working fine.

The problem is that the actual total of the website isn't working. I am accessing the total using the following code:


This calculates the rest of the fees just fine, but omits the fee representing the shipping insurance. I don't have any custom code that would specifically remove this fee from the calculation, so I am dumbfounded as to what might be causing this.

I hope to not have to post the entirety of my custom code here, so my question is what could possibly cause the total to ignore aprogramatically added fee?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.368697 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO