首先使用的訂單匯出外掛為 Advanced Order Export For WooCommerce
該網站的線上支援網站,點擊連結

如果手動新增訂單,同時手動新增商品(fee),而不是使用已經有新增在網站上的商品
在匯出訂單的時候,會導致商品名稱(Product Name)無法匯出抓不到資料
匯出的欄位會是空白

這時候可以在下方 其他設定 > 自訂 PHP 代碼以修改輸出
插入以下代碼
代碼參考網站,裡面的export Fee line as Product

//export Fee line as Products
add_filter('woe_fetch_order_products', function ($products, $order, $labels, $format, $static_vals) {
$i = count($products);
foreach($order-> get_items('fee') as $item_id => $item) {
$item_meta = $order->get_item_meta( $item_id );
$fee_amount = $item_meta['_fee_amount'][0];
$tax_amount = $item_meta['_line_tax'][0];
$row = array();
$i++;
foreach($labels as $field => $label) {
if ($field == 'line_id') {
$row[$field] = $i;
}
elseif($field == 'name') {
$row['name'] = $item["name"];
}
elseif($field == 'qty') {
$row['qty'] = 1;
}
elseif($field == 'tax_rate') {
$row[$field] = round($tax_amount/$fee_amount*100);
}
elseif($field == 'line_no_tax') {
$row[$field] = $fee_amount;
}
elseif($field == 'line_tax') {
$row[$field] = $tax_amount;
}
elseif($field == 'line_subtotal') {
$row[$field] = $fee_amount;
}
elseif($field == 'line_total') {
$row[$field] = $fee_amount;
}
elseif($field == 'line_total_plus_tax') {
$row[$field] = $fee_amount + $tax_amount;
}
elseif($field == 'item_price') {
$row[$field] = $fee_amount;
}
else {
$row[$field] = $item[$field];
}
}
$products[] = $row;
}
return $products;
}, 10, 5);

然後匯出的欄位使用 Product order items > 項目名稱 就可以囉
不用使用產品名稱,產品名稱還是抓不到手動新增的項目