'.date_i18n('F', strtotime('01-'.($the_month_num+1).'-2011')).' →'; endif; $sales_heading .= ''.__( 'Monthly Sales', 'woocommerce' ).''; if ( current_user_can( 'publish_shop_orders' ) ) { wp_add_dashboard_widget( 'woocommerce_dashboard_right_now', __( 'WooCommerce Right Now', 'woocommerce' ), 'woocommerce_dashboard_widget_right_now' ); wp_add_dashboard_widget( 'woocommerce_dashboard_recent_orders', __( 'WooCommerce Recent Orders', 'woocommerce' ), 'woocommerce_dashboard_recent_orders'); wp_add_dashboard_widget( 'woocommerce_dashboard_recent_reviews', __( 'WooCommerce Recent Reviews', 'woocommerce' ), 'woocommerce_dashboard_recent_reviews' ); } if ( current_user_can( 'view_woocommerce_reports' ) || current_user_can( 'publish_shop_orders' ) ) { //wp_add_dashboard_widget( 'woocommerce_dashboard_sales', $sales_heading, 'woocommerce_dashboard_sales' ); } } /** * WooCommerce Right Now widget. * * Adds a dashboard widget with shop statistics. * * @access public * @return void */ function woocommerce_dashboard_widget_right_now() { global $woocommerce; $product_count = wp_count_posts( 'product' ); $product_cat_count = wp_count_terms( 'product_cat' ); $product_tag_count = wp_count_terms( 'product_tag' ); $product_attr_count = count( $woocommerce->get_helper( 'attribute' )->get_attribute_taxonomies() ); $pending_count = get_term_by( 'slug', 'pending', 'shop_order_status' )->count; $completed_count = get_term_by( 'slug', 'completed', 'shop_order_status' )->count; $on_hold_count = get_term_by( 'slug', 'on-hold', 'shop_order_status' )->count; $processing_count = get_term_by( 'slug', 'processing', 'shop_order_status' )->count; ?>

publish ); $text = _n( 'Product', 'Products', intval( $product_count->publish ), 'woocommerce' ); $link = add_query_arg( array( 'post_type' => 'product' ), get_admin_url( null, 'edit.php' ) ); $num = '' . esc_html( $num ) . ''; $text = '' . esc_html( $text ) . ''; ?> 'product_cat', 'post_type' => 'product' ), get_admin_url( null, 'edit-tags.php' ) ); $num = '' . esc_html( $num ) . ''; $text = '' . esc_html( $text ) . ''; ?> 'product_tag', 'post_type' => 'product' ), get_admin_url( null, 'edit-tags.php' ) ); $num = '' . esc_html( $num ) . ''; $text = '' . esc_html( $text ) . ''; ?> 'woocommerce_attributes' ), get_admin_url( null, 'admin.php' ) ); $num = '' . esc_html( $num ) . ''; $text = '' . esc_html( $text ) . ''; ?>

'shop_order', 'shop_order_status' => 'pending' ), get_admin_url( null, 'edit.php' ) ); $num = '' . esc_html( $num ) . ''; $text = '' . esc_html( $text ) . ''; ?> 'shop_order', 'shop_order_status' => 'on-hold' ), get_admin_url( null, 'edit.php' ) ); $num = '' . esc_html( $num ) . ''; $text = '' . esc_html( $text ) . ''; ?> 'shop_order', 'shop_order_status' => 'processing' ), get_admin_url( null, 'edit.php' ) ); $num = '' . esc_html( $num ) . ''; $text = '' . esc_html( $text ) . ''; ?> 'shop_order', 'shop_order_status' => 'completed' ), get_admin_url( null, 'edit.php' ) ); $num = '' . esc_html( $num ) . ''; $text = '' . esc_html( $text ) . ''; ?>

WooCommerce %s.', 'woocommerce' ), $woocommerce->version ); ?>

8, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'shop_order', 'post_status' => 'publish' ); $orders = get_posts( $args ); if ($orders) : echo ''; else: echo '

' . __( 'There are no product orders yet.', 'woocommerce' ) . '

'; endif; } /** * Recent reviews widget * * @access public * @return void */ function woocommerce_dashboard_recent_reviews() { global $wpdb; $comments = $wpdb->get_results( "SELECT *, SUBSTRING(comment_content,1,100) AS comment_excerpt FROM $wpdb->comments LEFT JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' AND post_type = 'product' ORDER BY comment_date_gmt DESC LIMIT 5" ); if ( $comments ) { echo ''; } else { echo '

' . __( 'There are no product reviews yet.', 'woocommerce' ) . '

'; } }