# Fix for Mini cart doesn't refresh in woodmart

```php
if ((isset($_REQUEST['wc-ajax']) && ($_REQUEST['wc-ajax'] == 'add_to_cart' || $_REQUEST['wc-ajax'] == 'remove_from_cart')) || (isset($_REQUEST['action']) && $_REQUEST['action'] == 'woodmart_ajax_add_to_cart')) {
    add_action('woocommerce_mini_cart_contents', function (){
        ?>
        <script type="text/javascript">
            jQuery( document ).ready(function() {
                jQuery( document.body ).trigger( 'wc_fragment_refresh' );
                jQuery( document.body ).trigger( 'wc_fragment_refresh' );
            });
        </script>
        <?php
    });
}
```
