M
M
MisTFoR2020-12-19 11:48:53
WooCommerce
MisTFoR, 2020-12-19 11:48:53

How to make a thousands separator in the output of the sum of all items in the basket?

Hello.
I display the sum of all the goods in the basket using , so the question is: how to make a thousand separator (for example, in a basket of goods worth 20,000 rubles, you need to display "20,000")? <?php echo WC()->cart->cart_contents_total; ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Fink, 2020-12-19
@MisTFoR

https://www.php.net/manual/en/function.number-form...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question