After following the steps here to get AJAX add to cart working for variable products I'm running into an issue where immediately after I (successfully) add an item to the cart, and the cart is refreshed dynamically, the quantity +/- buttons do not show (not hidden, but are not rendered). The quantity value shows, but not the buttons that normally sit beside it.
The odd thing is if I refresh the page (at which point the page is loaded normally - not via get_refreshed_fragments - the buttons re-appear. Any ideas on what could lead to this behavior?
Solution
Thanks to @dingo_d's contribution it was pretty easy to figure it out. I didn't know WC removed the quantity buttons, which naturally pointed to the theme - in this case Avada - which plugged a code block at the bottom of main.js to re-add the buttons. The block only ran on load, no re-load with AJAX, a la no quantity buttons after cart refresh.
I just broke it out into a separate function and called it manually after the fragments are refreshed.
I don't know if you use a custom template files (you have woocommerce folder inside the theme), or just plain woocommerce + hook for appearance, but the new woocommerce (from ver 2.3 iirc) removed the +/- buttons on single item products.
I pulled a bit of jquery code from the old templates that renders the old buttons, and use it on my themes:
This will add a +/- buttons on the side of the quantity.
Now, if your theme has template files inside that have those buttons hardcoded, then you need to see their class and try to find the code that's governing them.
Hope this helps.
To Resolve above issue you just have to add ajaxComplete function to your themes functions.php
Add below script to your child themes script.js
var aObj;
function addPlusMinusIcons(){