In WooCommerce, I notice in both WC_Cart and WC_Order, there's both get_total_discount() and get_discount_total().
What is the difference between these? Which should I use to get the value of the discount on a cart/order?
Funny. I didn't notice it before.
get_total_discount
will return a formatted value of the discount (with the currency symbol, wrapped with HTML).
get_discount_total
will return just the value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With