'widget_product_categories', 'description' => __( "A list or dropdown of product categories", 'woothemes' ) ); parent::WP_Widget('product_categories', __('Product Categories', 'woothemes'), $widget_ops); } /** @see WP_Widget::widget */ function widget( $args, $instance ) { extract( $args ); $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Product Categories', 'woothemes' ) : $instance['title'], $instance, $this->id_base); $c = $instance['count'] ? '1' : '0'; $h = $instance['hierarchical'] ? '1' : '0'; $d = $instance['dropdown'] ? '1' : '0'; echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h, 'taxonomy' => 'product_cat'); if ( $d ) { $terms = get_terms('product_cat'); $output = ""; echo $output; ?> '') ); $title = esc_attr( $instance['title'] ); $count = isset($instance['count']) ? (bool) $instance['count'] :false; $hierarchical = isset( $instance['hierarchical'] ) ? (bool) $instance['hierarchical'] : false; $dropdown = isset( $instance['dropdown'] ) ? (bool) $instance['dropdown'] : false; ?>

/>
/>
/>