"; $columns["thumb"] = __("Thumb", 'woothemes'); $columns["id"] = __("ID", 'woothemes'); $columns["title"] = __("Name", 'woothemes'); $columns["parent"] = __("Parent Product", 'woothemes'); return $columns; } add_filter('manage_edit-product_variation_columns', 'woocommerce_edit_variation_columns'); function woocommerce_custom_variation_columns($column) { global $post; $product = &new woocommerce_product($post->ID); switch ($column) { case "thumb" : if (has_post_thumbnail($post->ID)) : echo get_the_post_thumbnail($post->ID, 'shop_tiny'); endif; break; case "id" : echo '#'.$post->ID; break; case "parent" : if ($post->post_parent) : $parent = get_post( $post->post_parent ); echo '#'.$parent->ID.' — '.$parent->post_title.''; endif; break; } } add_action('manage_product_variation_posts_custom_column', 'woocommerce_custom_variation_columns', 2); function woocommerce_edit_product_columns($columns){ $columns = array(); $columns["cb"] = ""; $columns["thumb"] = __("Thumb", 'woothemes'); $columns["title"] = __("Name", 'woothemes'); $columns["product_type"] = __("Type", 'woothemes'); $columns["sku"] = __("ID/SKU", 'woothemes'); $columns["product_cat"] = __("Category", 'woothemes'); $columns["product_tags"] = __("Tags", 'woothemes'); $columns["visibility"] = __("Visibility", 'woothemes'); $columns["featured"] = __("Featured", 'woothemes'); if (get_option('woocommerce_manage_stock')=='yes') : $columns["is_in_stock"] = __("In Stock?", 'woothemes'); $columns["inventory"] = __("Inventory", 'woothemes'); endif; $columns["price"] = __("Price", 'woothemes'); return $columns; } add_filter('manage_edit-product_columns', 'woocommerce_edit_product_columns'); function woocommerce_custom_product_columns($column) { global $post; $product = &new woocommerce_product($post->ID); switch ($column) { case "thumb" : if (has_post_thumbnail($post->ID)) : echo get_the_post_thumbnail($post->ID, 'shop_tiny'); endif; break; case "summary" : echo $post->post_excerpt; break; case "price": echo $product->get_price_html(); break; case "product_cat" : echo get_the_term_list($post->ID, 'product_cat', '', ', ',''); break; case "product_tags" : echo get_the_term_list($post->ID, 'product_tag', '', ', ',''); break; case "sku" : if ( $sku = get_post_meta( $post->ID, 'SKU', true )) : echo '#'.$post->ID.' - SKU: ' . $sku; else : echo '#'.$post->ID; endif; break; case "featured" : $url = wp_nonce_url( admin_url('admin-ajax.php?action=woocommerce-feature-product&product_id=' . $post->ID) ); echo ''; if ($product->is_featured()) echo ''; else echo ''; echo ''; break; case "visibility" : if ( $this_data = $product->visibility ) : echo $this_data; else : echo '–'; endif; break; case "is_in_stock" : if ( !$product->is_type( 'grouped' ) && $product->is_in_stock() ) echo ''; else echo '–'; break; case "inventory" : if ( $product->managing_stock() ) : echo $product->stock.' in stock'; else : echo '–'; endif; break; case "product_type" : echo ucwords($product->product_type); break; case "id" : echo '#'.$post->ID; break; } } add_action('manage_product_posts_custom_column', 'woocommerce_custom_product_columns', 2); function woocommerce_edit_order_columns($columns){ $columns = array(); $columns["cb"] = ""; $columns["order_status"] = __("Status", 'woothemes'); $columns["order_title"] = __("Order", 'woothemes'); $columns["customer"] = __("Customer", 'woothemes'); $columns["billing_address"] = __("Billing Address", 'woothemes'); $columns["shipping_address"] = __("Shipping Address", 'woothemes'); $columns["billing_and_shipping"] = __("Billing & Shipping", 'woothemes'); $columns["total_cost"] = __("Order Cost", 'woothemes'); return $columns; } add_filter('manage_edit-shop_order_columns', 'woocommerce_edit_order_columns'); function woocommerce_custom_order_columns($column) { global $post; $order = &new woocommerce_order( $post->ID ); switch ($column) { case "order_status" : echo sprintf( __('%s', 'woothemes'), sanitize_title($order->status), $order->status ); break; case "order_title" : echo ''.sprintf( __('Order #%s', 'woothemes'), $post->ID ).''; echo ''; break; case "customer" : if ($order->user_id) $user_info = get_userdata($order->user_id); ?>
order_subtotal); ?> | |
order_shipping); ?> | |
get_total_tax()); ?> | |
order_discount); ?> | |
order_total); ?> |