widget_cssclass = 'woocommerce widget_minicart'; $this->widget_description = __( "Display the user's Cart.", 'ycb' ); $this->widget_id = 'woocommerce_widget_minicart'; $this->widget_name = __( 'YCB Mini Cart', 'ycb' ); $this->settings = array(); parent::__construct(); } /** * widget function. * * @see WP_Widget * * @param array $args * @param array $instance */ public function widget( $args, $instance ) { global $theme_options; $cart_icon = ''; $this->widget_start( $args, $instance ); echo '
' . "\n"; echo ''; echo ' ' . $cart_icon . '' . sprintf(_n( '%d', '%d', WC()->cart->cart_contents_count, 'woothemes' ), WC()->cart->cart_contents_count ) . '' . ' ' . "\n"; echo '' . "\n"; echo '
'; // Insert cart widget placeholder - code in woocommerce.js will update this on page load echo '
'; $this->widget_end( $args ); } }