global $woocommerce; $total = $woocommerce->cart->get_subtotal(); $formatted_total = wc_price($total);