谁能帮我完成订单后如何显示最近的订单,现在我正在完成,已取消,正在处理,保留我如何仅显示已完成的购买...
You can do a loop like this to get all the completed orders.
$orders = get_posts( array (
'post_type' => 'shop_order',
'post_status' => 'wc-completed',
)
);
foreach ($orders as $order)
{
$order_wc = new WC_Order( $order->ID );
var_dump($order);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.