Fix - Hide if cart is empty option

This commit is contained in:
Mike Jolley 2012-08-10 14:36:24 +01:00
parent c72ae36fbe
commit b1e320f289
2 changed files with 6 additions and 5 deletions

View File

@ -159,6 +159,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Tweak - Swapped invoice and custom in paypal and added prefix (https://github.com/woothemes/woocommerce/issues/1149)
* Tweak - Order page styling
* Fix - has_file() handling for variations
* Fix - Hide if cart is empty option
= 1.6.2 - 09/08/2012 =
* Feature - Added google analytics event tracking for add to cart buttons (thanks to Max Rice)

View File

@ -35,7 +35,7 @@ class WooCommerce_Widget_Cart extends WP_Widget {
/** @see WP_Widget */
function widget( $args, $instance ) {
global $woocommerce;
extract( $args );
if ( is_cart() || is_checkout() ) return;
@ -44,11 +44,11 @@ class WooCommerce_Widget_Cart extends WP_Widget {
$hide_if_empty = empty( $instance['hide_if_empty'] ) ? 0 : 1;
echo $before_widget;
if ( $title )
if ( $title )
echo $before_title . $title . $after_title;
$woocommerce->mfunc_wrapper( 'woocommerce_mini_cart()', 'woocommerce_mini_cart', array( $hide_if_empty ? 'hide_cart_widget_if_empty' : '' ) );
$woocommerce->mfunc_wrapper( 'woocommerce_mini_cart()', 'woocommerce_mini_cart', array( 'list_class' => $hide_if_empty ? 'hide_cart_widget_if_empty' : '' ) );
echo $after_widget;