For our customization want to get woocommerce cart sub total amount in WordPress then place the following snippet in your file. Here $subtotal_amount having cart subtotal amount of woocommerce.

$subtotal_amount=WC()->cart->get_cart_subtotal();

Have any doubt, then comment here!

Leave a Reply

Your email address will not be published. Required fields are marked *