Is that Storefront?
Try:
add_action( 'after_setup_theme', 'remove_cart' );
function remove_cart() {
remove_action( 'storefront_header', 'storefront_header_cart', 60 );
}
Hi there,
If needed, you could also look into using the header designer module that comes with https://woocommerce.com/products/storefront-powerpack/. This allows you to create a custom layout including/excluding some header sections (e.g. the mini cart)
With that said, this forum is more geared towards supporting core aspects of the WooCommerce plugin. Seeing as that module forms part of the Storefront theme, please open a new support thread over at https://wordpress.org/support/theme/storefront/ for more help on this.