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

Correct the display of item prices in the mini cart for compatibility with the Modern Cart plugin.

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);