HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1014-azure #14~24.04.1-Ubuntu SMP Fri Oct 3 20:52:11 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: /mnt/data/dreamsrent-wp/wp-content/plugins/dreamsrent-booking/inc/orders-list.php
<h2><?php esc_html_e('Orders', 'bookingcore'); ?></h2>
        <?php
        $orders = wc_get_orders(array(
            'limit' => -1,
        ));

        if (!empty($orders)) :
        ?>
            <table class="widefat fixed" cellspacing="0">
                <thead>
                    <tr>
                        <th scope="col"><?php esc_html_e('Order ID', 'bookingcore'); ?></th>
                        <th scope="col"><?php esc_html_e('Product Name', 'bookingcore'); ?></th>
                        <th scope="col"><?php esc_html_e('Date', 'bookingcore'); ?></th>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach ($orders as $order) : 
                        $order_items = $order->get_items();
                        foreach ($order_items as $item_id => $item) :
                            ?>
                            <tr>
                                <td><?php echo esc_html($order->get_id()); ?></td>
                                <td><?php echo esc_html($item->get_name()); ?></td>
                                <td><?php echo esc_html($order->get_date_created()->date('Y-m-d H:i:s')); ?></td>
                            </tr>
                        <?php endforeach; ?>
                    <?php endforeach; ?>
                </tbody>
            </table>
        <?php else : ?>
            <p><?php esc_html_e('No orders found.', 'bookingcore'); ?></p>
        <?php endif; ?>