Website Building » WooCommerce » How Do I Remove the WooCommerce Cart Icon From the Header?

How Do I Remove the WooCommerce Cart Icon From the Header?

Last updated on January 23, 2023 @ 12:20 pm

There are two ways that you can go about removing the WooCommerce Cart Icon from the header. You can either use a plugin or edit your themes functions file.

Using a Plugin:

One way to go about this is by using the WooCommerce Menu Bar Cart plugin. Once installed and activated, head over to Settings and select Menu Bar Cart.

From here, simply check Disable Cart Icon and then click Save Changes.

Editing Your Themes Functions File:

If you would rather not use a plugin or if one isn’t available for your current theme, then another way is by editing your themes functions file.

Simply add these lines of code:


function my_custom_function() {if ( is_plugin_active( 'woocommerce/WooCommerce.php' ) ) {remove_action( 'storefront_header', 'storefront_header_cart', 60 );}}
add_action( 'init', 'my_custom_function' );

Once you’ve added this code to your functions.php file, save it and upload it to your server. The WooCommerce cart icon should now be removed from the header on your site.

Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.