Your cart is currently empty!
Orders Tracking
$current_user->ID,
‘limit’ => -1, // Retrieve all orders
) );
if ( ! empty( $customer_orders ) ) {
foreach ( $customer_orders as $order ) {
echo ‘
echo ‘
Order #’. $order->get_id() .’
‘;
echo ‘
Status: ‘. wc_get_order_status_name( $order->get_status() ) .’
‘;
echo ‘
Date: ‘. wc_format_datetime( $order->get_date_created() ) .’
‘;
echo ‘
Total: ‘. wc_price( $order->get_total() ) .’
‘;
echo ‘
Items:
‘;
echo ‘
- ‘;
- ‘ . $item->get_name() . ‘ × ‘ . $item->get_quantity() . ‘
foreach ( $order->get_items() as $item_id => $item ) {
$product = $item->get_product();
echo ‘
‘;
}
echo ‘
‘;
echo ‘
‘;
}
} else {
echo ‘
No orders found.
‘;
}
} else {
echo ‘
Please log in to view your orders.
‘;
}
?>