Don't assume ul is the immediate child inside cart widget.

This commit is contained in:
Gary Jones 2012-03-16 16:56:32 +00:00
parent fe800d6685
commit 3d0870110a
1 changed files with 2 additions and 2 deletions

View File

@ -80,9 +80,9 @@ class WooCommerce_Widget_Cart extends WP_Widget {
if ($hide_if_empty && sizeof($woocommerce->cart->get_cart())==0) { if ($hide_if_empty && sizeof($woocommerce->cart->get_cart())==0) {
$inline_js = " $inline_js = "
jQuery('.hide_cart_widget_if_empty').parent().hide(); jQuery('.hide_cart_widget_if_empty').closest('widget').hide();
jQuery('body').bind('adding_to_cart', function(){ jQuery('body').bind('adding_to_cart', function(){
jQuery(this).find('.hide_cart_widget_if_empty').parent().fadeIn(); jQuery(this).find('.hide_cart_widget_if_empty').closest('widget').fadeIn();
}); });
"; ";