Add additional columns to Woocommerce Orders View

Place this into functions.php located in your theme:// create column titlesfunction woo_order_extra_columns($columns){ $newcolumns = array(       “cb”       => “”,       “column_1”    => esc_html__(‘Colunn 1 Title’, ‘woocommerce’),       “column_2”    => esc_html__(‘Column 2 Title’, ‘woocommerce’));$columns = array_merge($newcolumns, $columns);return $columns;}add_filter(“manage_edit-shop_order_columns”, “woo_order_extra_columns”);// get values for columnsfunction woo_order_extra_columns_content($column){global $post;$order = new WC_Order($post->ID);$user_id = $order->user_id;switch ($column){   case “column_1”:

echo “column 1 data goes here”           break;   case “column_2”:           echo “column 2 data goes here”           break; }}add_action(“manage_posts_custom_column”,  “woo_order_extra_columns_content”);

Aly Chiman

Aly Chiman is a Blogger & Reporter at AlyChiTech.com which covers a wide variety of topics from local news from digital world fashion and beauty . AlyChiTech covers the top notch content from the around the world covering a wide variety of topics. Aly is currently studying BS Mass Communication at University.

Leave a Reply

Your email address will not be published. Required fields are marked *