woothemes/woocommerce — pull request #1723 by helgatheviking (2012-11-09 18:06:49+00:00)
Title: fix cart widget not hidden despite option being checked.

I checked the box to hide the cart widget if it was empty, but in my theme (which doesn't have a .widget class and instead uses .widgetcontainer) the inline js was not hiding the widget.

```
jQuery('.hide_cart_widget_if_empty').closest('.widget').hide();
jQuery('body').bind('adding_to_cart', function(){
jQuery(this).find('.hide_cart_widget_if_empty').closest('.widget').fadeIn();
});
```

I switched to something that isn't class-based so it should work with all themes

```
jQuery('.hide_cart_widget_if_empty').parent().hide();
jQuery('body').bind('adding_to_cart', function(){
jQuery(this).find('.hide_cart_widget_if_empty').parent().fadeIn();
});
```