php - Wordpress - woocommerce - adding to cart, cart item quantity not updating
Get the solution ↓↓↓I am changing the input_value for the product quantity input with woocommerce_quantity_input().
It dose what I want, but only if I do a hard reloade of the browser.
If I just add the product to the cart and reloade the cart the quantity wont update.
Maybe its cached, and if so. Can I clear it? Or can I simulate a hard reset?
$product_quantity = woocommerce_quantity_input( array(
'input_name' => "cart[{$cart_item_key}][qty]",
'input_value' => $sInputValue,
'max_value' => $aProductMaxData[0]->product_max_cap,
'product_name' => $_product->get_name(),
), $_product, false );
This is the hook I'm using
woocommerce_cart_item_quantity
Answer
Solution:
Are you tring to update quantity using Ajax, would you like to share your site link to look.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: invalid argument supplied for foreach() laravel
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.