WooCommerce Mini Cart Divi Menu Header Not Updating

If your Divi theme is not updating the menu header WooCommerce cart count when you add an item via AJAX there’s a fix.  Use the following WooCommerce snippet to ensure the cart contents count is updated in the Divi navigation menu having to refresh the page.

 

The trick here to ensure the cart keep the same Divi cart count layout is to use the et_show_cart_total() function.  Furthermore, we buffer the output that this aforementioned function generates in order to update the WooCommerce fragments.

Leave a Reply

Your email address will not be published. Required fields are marked *