Merge pull request #2664 from krbvroc1/fix_cart_widget_hiding

Fix hide cart if empty
This commit is contained in:
Mike Jolley 2013-03-11 03:00:24 -07:00
commit e2da14e491
1 changed files with 2 additions and 2 deletions

View File

@ -79,10 +79,10 @@ class WC_Widget_Cart extends WP_Widget {
if ( $hide_if_empty && sizeof( $woocommerce->cart->get_cart() ) == 0 ) {
$woocommerce->add_inline_js( "
jQuery('.hide_cart_widget_if_empty').closest('.widget').hide();
jQuery('.hide_cart_widget_if_empty').closest('.widget_shopping_cart').hide();
jQuery('body').bind('adding_to_cart', function(){
jQuery('.hide_cart_widget_if_empty').closest('.widget').fadeIn();
jQuery('.hide_cart_widget_if_empty').closest('.widget_shopping_cart').fadeIn();
});
" );
}