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 ‘

    ‘;

    foreach ( $order->get_items() as $item_id => $item ) {
    $product = $item->get_product();
    echo ‘

  • ‘ . $item->get_name() . ‘ × ‘ . $item->get_quantity() . ‘
  • ‘;
    }

    echo ‘

‘;
echo ‘

‘;
}
} else {
echo ‘

No orders found.

‘;
}
} else {
echo ‘

Please log in to view your orders.

‘;
}
?>

Unlock exclusive deals awaiting you

firstorder10

Your exclusive code is ready! Copy it now!

Get 10% off now!
1