I need to have the import of cart in woocommerce.
But i need the number without wc_price().
This is my code:
global $woocommerce;
$app=$woocommerce->cart->get_cart_total();
$app2=$woocommerce->cart->total;
and it results:
app = $20.00
app2 = 0
and the cart is of $20.00
Thanks.
You try
Or
the solution depends on the type of currency that is occupied in this case the euro occupied, so we had to replace the euro in htmlentities as shown here
Note: trim ‘& euro’
You can try