Want to show custom column in WooCommerce? Use following code in your theme’s functions.php file OR in site specific plugin.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | /** * Show custom column in WooCommerce. */ function your_function_name($columns){ $columns['delivery_date'] = __('Delivery date','textdomain'); return $columns; } function your_other_function_name($column) { swith($column) { // your custom code here and do what you want. case 'delivery_date': } } add_filter( 'manage_edit-shop_order_columns','your_function_name',10 ); add_action( 'manage_shop_order_posts_custom_column','your_other_function_name',20 ); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.