# Mini cart item price display incorrectly, compatibility for Modern Cart for WooCommerce

```php
add_action('moderncart_slide_out_content', function () {
    if (function_exists('WC')) {
        if (isset(WC()->cart) && WC()->cart != null) {
            if (method_exists(WC()->cart, 'calculate_totals')) {
                WC()->cart->calculate_totals();
            }
        }
    }
}, 1);
```
