$column_info) { $new_columns[$column_name] = $column_info; if ($column_name === 'order_total') { $new_columns['to_print_date'] = __('To Print Date', 'studiou-wc-ord-print-statuses'); $new_columns['in_print_date'] = __('In Print Date', 'studiou-wc-ord-print-statuses'); $new_columns['external_order_number'] = __('External Order Number', 'studiou-wc-ord-print-statuses'); UtilsLog::log('3 order columns added'); } } return $new_columns; } public function add_custom_shop_order_column_content($column, $post_id) { $order = wc_get_order($post_id); switch ($column) { case 'to_print_date': $to_print_date = $order->get_meta('to_print_date'); echo $to_print_date ? date_i18n(get_option('date_format') . ' ' . get_option('time_format'), strtotime($to_print_date)) : '—'; break; case 'in_print_date': $in_print_date = $order->get_meta('in_print_date'); echo $in_print_date ? date_i18n(get_option('date_format') . ' ' . get_option('time_format'), strtotime($in_print_date)) : '—'; break; case 'external_order_number': echo $order->get_meta('external_ref_ord_no') ?: '—'; break; } } }