I’m trying to get the float value from WooCommerce’s cart
don’t want to parse this function:
$woocommerce->cart->get_cart_subtotal();
is there any way to get clean subtotal from the woocommerce’s cart?
it suppose to be really simple, but i’m stuck 🙂
Borrowing from the cart class’s
get_cart_subtotal()
method, I believe you could do something like:This assumes that you aren’t doing compounded tax. The unformatted subtotals seem to be stored as class variables.