0
A
回答
1
看到你還沒有得到一個答案,我做我自己的自定義一個(其不相同的,absolutelly不最佳,但至少它的作品) 我使用的所有方法是從這裏:https://docs.woocommerce.com/wc-apidocs/class-WC_Order.html
<table class="widefat">
<thead>
<tr>
<th class="row-title">Ordre-ID</th>
<th>Customer ID</th>
<th>Name</th>
<th>adress</th>
<th>note</th>
<th>button</th>
</tr>
</thead>
<tbody>
<?php
global $woocommerce;
$filters = array(
'post_status' => 'completed',
'post_type' => 'shop_order',
'posts_per_page' => 200,
'paged' => 1,
'orderby' => 'modified',
'order' => 'DESC'
);
$loop = new WP_Query($filters);
while ($loop->have_posts()) {
$loop->the_post();
$order = new WC_Order($loop->post->ID);
$items = $order->get_items();
<tr class="">
<td class="row-title"><a href=""><?=$order->get_order_number(); ?></a></td>
<td><a href=""><?=$order->get_customer_id(); ?></a></td>
<td><?=$order->get_formatted_shipping_full_name(); ?></td>
<td><?=$order->get_shipping_address_1(); ?></td>
<td><?=$order->get_customer_note(); ?></td>
<td><input type="button" class="button" id="order_id-<?=$order->get_order_number();?>" value="Send" data-id="order_id-<?=$order->get_order_number();?>"></td>
</tr>
<?php
}
?>
</tbody>
</table>
相關問題
- 1. 獲取訂單項woocommerce訂單
- 2. Woocommerce獲取訂單密鑰
- 3. 獲取大部車在Woocommerce訂單
- 4. 獲取WooCommerce訂單變更商品ID
- 5. Woocommerce wp_query通過ID獲取訂單
- 6. WooCommerce獲取有關訂單的信息
- 7. 從WooCommerce訂單獲取發票號碼
- 8. Woocommerce的訂單狀態列表
- 9. 從當前用戶訂單獲取訂單ID在WooCommerce中
- 10. 在woocommerce下訂單後獲取最新的訂單編號
- 11. 從Woocommerce訂單/ WC_Order對象獲取訂單註釋?
- 12. 獲取所有WooCommerce訂閱
- 13. 刪除取消訂單WooCommerce
- 14. WooCommerce訂閱掛鉤:獲取訂單項目
- 15. WooCommerce:從訂閱訂單獲取名稱和變體
- 16. Woocommerce訂單號
- 17. WooCommerce訂閱低於訂單
- 18. WooCommerce作爲單獨的字段獲取訂單送貨地址
- 19. Woocommerce訂單導出
- 20. 創建WooCommerce訂單
- 21. 訂單屏幕的Ajax或SignalR
- 22. 訂單是否需要確認屏幕?
- 23. Woocommerce訂閱 - 獲取開始日期
- 24. 聯繫表7 + WooCommerce - 保存訂單
- 25. 在woocommerce中創建訂單退貨表
- 26. Woocommerce - 獲取訂單項目的價格和數量。
- 27. WooCommerce REST API - 獲取使用參數之前/之前的訂單
- 28. 如何獲取woocommerce中當前用戶的所有訂單
- 29. 如何通過產品ID wordpress獲取woocommerce訂單?
- 30. 如何獲取Woocommerce中刪除的訂單(已刪除)