WordPress filter hook

woocommerce_widget_cart_is_hidden

Defined by WooCommerce and fired by 6 plugins in total, running on 7M+ sites between them.

How to use woocommerce_widget_cart_is_hidden

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'woocommerce_widget_cart_is_hidden', function( $settings ) {
	// Change $settings here.
	return $settings;
}, 10, 1 );

Argument names come from Thim Elementor Kit's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

6 plugins that fire woocommerce_widget_cart_is_hidden

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'woocommerce_widget_cart_is_hidden', is_cart() || is_checkout() ) includes/widgets/class-wc-widget-cart.php:55
  2. Thim Elementor Kit icon Thim Elementor Kit20,000+ installs apply_filters( 'woocommerce_widget_cart_is_hidden', $settings['hide_empty'] ) inc/elementor/widgets/global/minicart.php:1751
  3. Boostify Header Footer Builder for Elementor icon Boostify Header Footer Builder for Elementor6,000+ installs apply_filters( 'woocommerce_widget_cart_is_hidden', is_cart() || is_checkout() ) inc/elementor/module/class-woocommerce.php:230
  4. Responsive Addons for Elementor icon Responsive Addons for Elementor3,000+ installs apply_filters( 'woocommerce_widget_cart_is_hidden', false ) includes/widgets-manager/class-responsive-addons-for-elementor-widgets-manager.php:866
  5. MAS Elementor icon MAS Elementor800+ installs apply_filters( 'woocommerce_widget_cart_is_hidden', false ) modules/woocommerce/module.php:272
  6. Bolt Checkout for WooCommerce icon Bolt Checkout for WooCommerce100+ installs apply_filters( 'woocommerce_widget_cart_is_hidden', false ) includes/classes/class-bolt-wc-order-attribution.php:169

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.