__( "Shopping Cart for the sidebar.", 'woothemes') ); parent::WP_Widget('shopping_cart', __('WooCommerce Shopping Cart', 'woothemes'), $widget_ops); } /** @see WP_Widget::widget */ function widget( $args, $instance ) { if (is_cart()) return; extract($args); if ( !empty($instance['title']) ) $title = $instance['title']; else $title = __('Cart', 'woothemes'); $title = apply_filters('widget_title', $title, $instance, $this->id_base); echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; echo '
'; if (get_option('js_prices_include_tax')=='yes') : _e('Total', 'woothemes'); else : _e('Subtotal', 'woothemes'); endif; echo ': '.woocommerce_cart::get_cart_total(); echo '
'; do_action( 'woocommerce_widget_shopping_cart_before_buttons' ); echo ' '; endif; echo $after_widget; } /** @see WP_Widget::update */ function update( $new_instance, $old_instance ) { $instance['title'] = strip_tags(stripslashes($new_instance['title'])); return $instance; } /** @see WP_Widget::form */ function form( $instance ) { ?>