hide_cart_widget_if_empty compatibility with fragments. Closes #2642.
This commit is contained in:
parent
bfb542b930
commit
8098754913
|
@ -66,10 +66,14 @@ class WC_Widget_Cart extends WP_Widget {
|
|||
if ( $title )
|
||||
echo $before_title . $title . $after_title;
|
||||
|
||||
//$woocommerce->mfunc_wrapper( 'woocommerce_mini_cart()', 'woocommerce_mini_cart', array( 'list_class' => $hide_if_empty ? 'hide_cart_widget_if_empty' : '' ) );
|
||||
if ( $hide_if_empty )
|
||||
echo '<div class="hide_cart_widget_if_empty">';
|
||||
|
||||
// Insert cart widget placeholder - code in woocommerce.js will update this on page load
|
||||
echo '<div class="widget_shopping_cart_content ' . ( $hide_if_empty ? 'hide_cart_widget_if_empty' : '' ) . '"></div>';
|
||||
echo '<div class="widget_shopping_cart_content"></div>';
|
||||
|
||||
if ( $hide_if_empty )
|
||||
echo '</div>';
|
||||
|
||||
echo $after_widget;
|
||||
|
||||
|
@ -78,7 +82,7 @@ class WC_Widget_Cart extends WP_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();
|
||||
jQuery('.hide_cart_widget_if_empty').closest('.widget').fadeIn();
|
||||
});
|
||||
" );
|
||||
}
|
||||
|
|
|
@ -182,6 +182,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
* Fix - woocommerce_cancel_unpaid_orders respects the manage stock setting.
|
||||
* Fix - Mijireh Page Slurp.
|
||||
* Fix - Removed unused 'woocommerce_prepend_shop_page_to_urls' setting from breadcrumbs.
|
||||
* Fix - hide_cart_widget_if_empty option.
|
||||
|
||||
= 2.0.2 - 06/03/2013 =
|
||||
* Fix - Frontpage shop when 'orderby' is set.
|
||||
|
|
Loading…
Reference in New Issue