M
M
MisTFoR2021-11-28 21:54:58
AJAX
MisTFoR, 2021-11-28 21:54:58

How to automatically update the price of a product from its quantity?

Hello.
I have a WordPress site and a WooCommerce mini shopping cart.
When, for example, you have added products, you can open the mini basket on the page and use the buttons and minus to add / reduce its quantity.
But, there is a problem - the price is not updated. How to fix it?
I display the price using the Button class minus "minicart__product__counter__minus", plus "minicart__product__counter__plus " <?php echo $product_price; ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WP Panda, 2021-11-29
@MisTFoR

after + and minus you need to run wc_fragment_refresh
What and how you can see in this answer https://stackoverflow.com/questions/41782403/force...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question