Cart not refreshing after running woodmart_ajax_add_to_cart();
-
Hello. We’ve made a “frequently bought together” function that shows a button on every single product page, which sends woodmart_ajax_add_to_cart() calls that add items to the cart.
This works successfully, BUT the cart does NOT refresh. How to refresh the cart?
I’ll send a link in the private section
Hello,
Sorry, but we don’t know how your custom solution works and why it doesn’t update the cart widget. You can check our own implementation as a reference in the file woodmart/js/scripts/wc/addToCartAllTypes.js
https://gyazo.com/4d17b4f13757b495a0fd515cf3d0df8c
and woodmart/inc/integrations/woocommerce/functions.php
https://gyazo.com/23852a26fb3fdf968fb14d61435d5221
Kind Regards