2 ways to list WooCommerce orders in the front end (with plugins or code)

List WooCommerce Orders Front End

WooCommerce hides order data in the WordPress admin by default, but many businesses need to display this information on the front end. Whether you're creating dashboards for delivery drivers, providing vendors with their sales data, or building custom inventory management systems, you need a way to list WooCommerce orders.

The standard WooCommerce setup only shows customers their own orders through the My Account page. It doesn't provide any built-in method to display all orders or create custom order views on your website's front end.

This creates challenges for businesses that need to:

  • Give staff members access to order data without WordPress admin privileges.
  • Display order information to delivery partners or fulfillment teams.
  • Create vendor-specific order views for multi-vendor marketplaces.
  • Build custom reporting dashboards for different user roles.
  • Implement front-end inventory management systems.

This guide covers two proven methods to list WooCommerce orders on the front end. The first uses Posts Table Pro, a plugin solution that requires no coding. The second uses the wc_get_orders() function for developers who need custom implementations.

Both methods let you display comprehensive order information including customer details, shipping addresses, payment data, and order status. You'll learn how to create filtered views, implement security measures, and customize the display to match your exact requirements.

What is Posts Table Pro?

Posts Table Pro is a WordPress table plugin that lists any WordPress content in a structured HTML table, including WooCommerce orders.

Posts Table Pro is developed and supported by us at Barn2. It displays pages, posts, custom post types, and WooCommerce order lists in organized tables.

The plugin includes dozens of configuration options. You can select which columns of order data to display. You can control how the table is sorted. You can customize the search functionality and filtering options.

Posts Table Pro differs from our WooCommerce Product Table plugin. WooCommerce Product Table lists standard WooCommerce products in a table format. Posts Table Pro handles WooCommerce orders, which are stored as separate custom post types. This distinction makes Posts Table Pro the correct choice for displaying order lists.

This tutorial covers two methods: listing all WooCommerce orders in the front end and showing orders for specific customers only.

Which solution should you use for WooCommerce orders?

This comparison table helps you choose the right solution based on your technical skills and requirements for displaying WooCommerce orders:

Feature Posts Table Pro WooCommerce Product Table Native WooCommerce Custom wc_get_orders() code
Purpose Display orders, posts, and custom post types Display products only Basic customer order history Custom order displays
Can display orders ✅ Yes ❌ No ✅ Limited (customer's own only) ✅ Yes
Technical skills required None None None PHP development
Setup time 5-10 minutes 5-10 minutes Already included 1-3 hours
Customization options Extensive (via settings) Extensive (via settings) Very limited Unlimited (requires coding)
Front-end display ✅ Yes ✅ Yes ✅ Yes (My Account only) ✅ Yes
Admin display ❌ No (use native) ❌ No (use native) ✅ Yes ✅ Possible
Show all orders ✅ Yes ❌ No ❌ No ✅ Yes
Filter by status ✅ Yes N/A ❌ No ✅ Yes
Filter by customer ✅ Yes (with setup) N/A ✅ Automatic (logged-in user) ✅ Yes
Search functionality ✅ Yes ✅ Yes ❌ No ✅ Can implement
Sortable columns ✅ Yes ✅ Yes ❌ No ✅ Can implement
Export options ✅ Yes ✅ Yes ❌ No ✅ Can implement
Responsive design ✅ Yes ✅ Yes ✅ Yes Depends on implementation
HPOS compatibility Requires compatibility mode N/A ✅ Full support ✅ Full support
Maintenance required Plugin updates only Plugin updates only None Code maintenance needed
Support available ✅ Professional support ✅ Professional support ✅ WooCommerce support ❌ Self-supported
Cost Paid plugin Paid plugin Free Development time/cost
Best for Non-technical users needing full order management Product catalog displays Basic customer order history Developers needing custom solutions

Key takeaways:

  • Use Posts Table Pro when you need to display WooCommerce orders on the front end without coding
  • Use WooCommerce Product Table for product displays only - it cannot show orders
  • Use native WooCommerce when customers only need to see their own order history
  • Use custom wc_get_orders() code when you need highly specific functionality and have PHP development skills

How to list WooCommerce orders in a table on the front end

Step 1. Create the table of orders

List WooCommerce Orders Plugin

Follow these steps to create an instant table listing WooCommerce orders:

  1. First, get the Posts Table Pro plugin.
  2. Upon installing the plugin, you will be prompted with an automatic setup wizard to help you create your first table.
  3. Provide a name for your table. Select "Shop orders" as your custom post type. Choose which posts or product pages to include in the table. Available options include posts, pages, and custom post types.
  4. Customize your table's appearance by selecting columns and their display order. To add a new column, choose the column type from the dropdown menu and click "Add."
  5. Configure sorting options by selecting the default sorting method and sort direction. This controls the order in which WooCommerce orders appear in your list.
  6. Navigate to Post Tables → Settings. Find the "Links" option and enter "none". This prevents orders from being clickable, which is necessary because WooCommerce doesn't provide individual front-end order pages to link to.

Essential columns to Include in your WooCommerce order list with Posts Table Pro:

    • ID - rename this column to "Order ID".
    • Date
    • Shipping first name - Add this as a custom field column, enter _shipping_first_name as the custom field name, and rename the column to "First Name".
    • Shipping last name - Add this as a custom field column, enter _shipping_last_name as the custom field name, and rename the column to "Last Name".
    • Shipping address 1 - Add this as a custom field column, enter _shipping_address_1 as the custom field name, and rename the column to "Address 1".
    • Shipping city - Add this as a custom field column, enter _shipping_city as the custom field name, and rename the column to "City".
    • Postcode - Add this as a custom field column, enter _shipping_postcode as the custom field name, and rename the column to "Postcode".
    • Phone - Add this as a custom field column, enter _shipping_postcode as the custom field name, and rename the column to "Phone".
    • Total - Add this as a custom field column, enter cf:_order_total as the custom field name, and rename the column to something like "Total ($)".

Quick reference: all available WooCommerce order fields

This quick reference lists all available WooCommerce order fields you can display in Posts Table Pro. Each field requires creating a custom field column with the specified field name:

Field category Field description Custom field name
Customer data Customer IP address _customer_ip_address
Customer browser/OS _customer_user_agent
Order creation method _created_via
Billing information Complete billing address _billing_address_index
Billing first name _billing_first_name
Billing last name _billing_last_name
Billing company _billing_company
Billing email _billing_email
Billing phone _billing_phone
Billing country _billing_country
Billing address line 1 _billing_address_1
Billing address line 2 _billing_address_2
Billing city _billing_city
Billing state _billing_state
Billing postcode _billing_postcode
Shipping information Complete shipping address _shipping_address_index
Shipping first name _shipping_first_name
Shipping last name _shipping_last_name
Shipping company _shipping_company
Shipping country _shipping_country
Shipping address line 1 _shipping_address_1
Shipping address line 2 _shipping_address_2
Shipping city _shipping_city
Shipping state _shipping_state
Shipping postcode _shipping_postcode
Payment information Order currency _order_currency
Prices include tax _prices_include_tax
Payment method code _payment_method
Payment method title _payment_method_title
Order total _order_total
Shipping cost _order_shipping
Total discount _cart_discount
Payment date _date_paid
Payment date (formatted) c_paid_date
Tax information Total tax _order_tax
Shipping tax _order_shipping_tax
Tax discount _cart_discount_tax
Order status Transaction ID _transaction_id
Completion date _date_completed
Completion date (formatted) _completed_date

Step 2. Ensure Posts Table Pro can display your WooCommerce orders

WooCommerce versions 8.2 and later store order data differently. Posts Table Pro requires compatibility mode to access this data. Sites created before WooCommerce 8.2 already have orders stored in the compatible format and can skip this step.

For newer sites, enable compatibility mode:

  1. Navigate to WooCommerce → Settings → Advanced → Features
  2. Under Order data storage, tick the Enable compatibility mode checkbox

Compatibility mode forces WooCommerce to use pre-HPOS data storage methods. This may impact performance on high-traffic sites. Test thoroughly before implementing on production sites. This requirement exists because Posts Table Pro currently reads from the traditional WordPress database structure.

WooCommerce compatibility mode HBOS

What else can I list in the table of WooCommerce orders?

The WooCommerce order table supports numerous data columns beyond the basic examples provided. You can add any column that matches your inventory management needs through the table builder's Columns page.

Order status

Order status displays the current processing state of each order. Add a "status" column to include this information in your WooCommerce order list.

Order meta fields

WooCommerce stores extensive order metadata in the wp_postmeta database table. Each meta field can become a table column by creating a custom field column and entering the corresponding field name:

  • Customer IP address - _customer_ip_address
  • Customer's browser and operating system - _customer_user_agent
  • Order creation method - _created_via
  • Billing details:
    • Complete billing information - _billing_address_index
    • Billing first name - _billing_first_name
    • Billing last name - _billing_last_name
    • Billing company name - _billing_company
    • Billing email address - _billing_email
    • Billing phone number - _billing_phone
    • Billing country - _billing_country
    • Billing address line 1 - _billing_address_1
    • Billing address line 2 - _billing_address_2
    • Billing city - _billing_city
    • Billing state - _billing_state
    • Billing postcode - _billing_postcode
  • Shipping details:
    • Complete shipping information - _shipping_address_index
    • Shipping first name - _shipping_first_name
    • Shipping last name - _shipping_last_name
    • Shipping company name - _shipping_company
    • Shipping country - _shipping_country
    • Shipping address line 1 - _shipping_address_1
    • Shipping address line 2 - _shipping_address_1
    • Shipping city - _shipping_city
    • Shipping state - _shipping_state
    • Shipping postcode - _shipping_postcode
  • Order payment data:
    • Currency - _order_currency
    • Tax inclusion status - _prices_include_tax
    • Payment method code - _payment_method
    • Payment method name - _payment_method_title
    • Total order cost - _order_total
    • Shipping cost - _order_shipping
    • Total discount - _cart_discount
    • Payment date - _date_paid
    • Payment date (formatted) - c_paid_date
  • Tax information:
    • Total tax - _order_tax
    • Shipping tax - _order_shipping_tax
    • Tax discount - _cart_discount_tax
  • Transaction ID - _transaction_id
  • Order status data:
    • Completion date - _date_completed
    • Completion date (formatted) - _completed_date

This comprehensive list serves as a reference for WooCommerce database fields. These fields enable detailed order tracking and reporting through your front-end tables.

List WooCommerce orders based on their status

Order status filtering allows you to display specific order types like completed, pending, or refunded orders in separate tables.

Posts Table Pro can filter orders by their current status. Configure this using the status parameter in your table shortcode.

Available status codes:

  • Completed orders - wc-completed
  • Orders pending payment - wc-pending
  • Payment processing - wc-processing
  • On hold orders - wc-on-hold
  • Cancelled orders - wc-cancelled
  • Refunded orders - wc-refunded
  • Failed payment - wc-failed

Example shortcode for completed orders only:

[posts_table_template="1" status="wc-completed" links="none"]

Other options to customize your list of WooCommerce orders

Posts Table Pro provides extensive customization options for WooCommerce inventory management. Beyond column selection, you can configure sort order, search functionality, pagination, and display elements.

Column names can be customized to match your requirements. The column heading documentation explains how to rename any WooCommerce order table column.

The plugin knowledge base contains detailed documentation for all available configuration options.

WooCommerce doesn't create front-end order pages. Posts Table Pro's default links point to non-existent pages. The solution is disabling all links in your order table as shown in the setup instructions.

Custom code can create links to admin Edit Order pages. This requires PHP development skills. For professional implementation, consider hiring a WordPress expert through Codeable.

Can I list the products for each order?

Product listings within individual orders aren't accessible through Posts Table Pro. WooCommerce stores this data in a format the plugin cannot display directly.

Access individual order product lists through the WordPress admin:

  1. Copy the Order ID from your front-end order table
  2. Navigate to [your-domain]/wp-admin/post.php?post=12345&action=edit (replace 12345 with your Order ID)

This method provides direct access to the Edit Order screen containing complete product information.

Don't forget customer confidentiality!

List WooCommerce orders securely
Customer data protection is essential when displaying WooCommerce orders on the front end. Always implement appropriate security measures.

WooCommerce restricts front-end order display by default because order information contains confidential customer data.

Legitimate use cases exist for front-end order displays. Delivery drivers may need order access without admin privileges. Administrative and finance staff might require order visibility through dedicated interfaces. These scenarios benefit from controlled front-end WooCommerce inventory management.

Essential security measures include:

  • Implementing SSL certificates for encrypted data transmission
  • Using password-protected pages for order lists
  • Restricting access to authorized personnel only
  • Regular security audits of your implementation

Can customers see a front-end list of their own orders?

WooCommerce includes built-in customer order visibility. The 'My Account' page displays order history for logged-in customers. No additional plugins are required for this basic functionality.

The [my_orders] shortcode displays customer orders anywhere on your site. Users must be logged in to view their order history through this shortcode.

Posts Table Pro becomes necessary when displaying all orders or creating custom filtered views beyond individual customer orders.

Can customers see a list of their own orders?

Displaying user-specific orders requires additional configuration. WooCommerce doesn't store customer details as taxonomies on the 'shop_order' post type. This limitation requires workarounds for customer-specific order displays.

Multi-vendor sites particularly benefit from vendor-specific order views. Each vendor can access their order table or report without seeing other vendors' data.

Two implementation approaches exist: manual configuration for non-technical users and automated solutions for developers.

Option 1 - Create a hidden page for each customer listing their orders

  1. Create a hidden page for each customer. Apply password protection to each page.
  2. Create a custom taxonomy named 'Customer'. Tag each order with the appropriate customer username or ID.
  3. Configure Posts Table Pro on each page. Select "Custom taxonomy" when choosing posts to include. Choose the term matching the individual customer.
  4. Send customers their unique page link and password.
  5. Repeat this process for all customers requiring front-end order access.

Option 2 - Automated solution

Developers can implement this automated approach:

  1. Create a custom taxonomy on 'shop_order' post type. Configure automatic population with order placer's username.
  2. Modify the WooCommerce Account page template. Replace the default order list with a Posts Table Pro shortcode.
  3. Update the shortcode to reference your custom taxonomy slug.
  4. Dynamically populate the taxonomy term with the current user's username.

This implementation creates an automated table displaying user-specific orders on the WooCommerce Account page.

How to use wc_get_orders() to get WooCommerce orders

The wc_get_orders() function is a PHP method for programmatically retrieving and displaying WooCommerce orders on your site's front end.

Developers can use the wc_get_orders() function to fetch order data programmatically. This approach enables custom dashboards and reports with complete control over data presentation.

Step 1: Understand the wc_get_orders() function

wc_get_orders() retrieves orders based on specified criteria. Filter options include date ranges, order status, customer ID, and custom parameters. The function returns an array of order objects for processing.

Step 2: Add the PHP snippet

To display orders on the front end, add this PHP snippet to your child theme’s functions.php file or a custom plugin:

function display_woocommerce_orders() {
    $orders = wc_get_orders(array(
        'limit' => 10, // Number of orders to fetch
        'status' => 'completed', // Filter by order status
        'orderby' => 'date',
        'order' => 'DESC',
    ));

    if (!empty($orders)) {
        echo '<table class="woocommerce-orders-table">';
        echo '<tr><th>Order ID</th><th>Customer</th><th>Total</th><th>Date</th></tr>';

        foreach ($orders as $order) {
            $order_id = $order->get_id();
            $customer_name = $order->get_billing_first_name() . ' ' . $order->get_billing_last_name();
            $order_total = $order->get_total();
            $order_date = $order->get_date_created()->format('Y-m-d');

            echo "<tr>
                <td>#{$order_id}</td>
                <td>{$customer_name}</td>
                <td>\${$order_total}</td>
                <td>{$order_date}</td>
            </tr>";
        }

        echo '</table>';
    } else {
        echo '<p>No orders found.</p>';
    }
}

add_shortcode('display_orders', 'display_woocommerce_orders');

Step 3: Display the orders

Display orders on any page using this shortcode:

[display_orders]

Step 4: Customize the output

Our example pulls completed orders, but you can adjust the wc_get_orders() parameters to retrieve orders by:

  • Order status - Use values like processing or on-hold
  • Customer ID - Filter by specific customer using customer_id => 5
  • Date range - Set date parameters like date_created => '>=2024-01-01'
  • Payment method - Filter by payment gateway used
  • Shipping method - Filter by shipping option selected

wc_get_orders() provides complete flexibility for custom order displays. Posts Table Pro remains the preferred solution for users seeking code-free implementation with built-in filtering and sorting controls.

Over to you!

You now have comprehensive instructions for listing WooCommerce orders in front-end inventory management systems. Get Posts Table Pro and configure your order display today!

Share your implementation details in the comments. What columns do you display? How do you use front-end order lists? What security measures protect your customer data? Your experiences help other store owners optimize their WooCommerce inventory management.

52 Comments

  1. You guys used to write brilliant and clear articles. This one is not one of them: E.g. "In this example, we'll choose "Shop orders" as our custom post type. Next, you can choose the posts or product pages you wish to include in the table. You can select from a range of options, including posts, pages, and custom post types." No "Shop orders" custom post type shows up in the dropdown list. What do you mean be select a range of options? I got stuck right there at the beginning. But what about the table displayed toward the end of the article? Has nothing to do with orders(?).

    • Hi, John. I'm sorry to hear you're having difficulty with the WooCommerce "Shop orders" post type not displaying in the dropdown for selecting the type of content you want to display when creating a table in the Table Builder. Thanks for letting us know so we can help sort it out. So that we can assist you with this best and provide you with full support as quickly as possible, please could you submit a request via our Support Center together with your plugin license key. Many thanks.

  2. Hi, i am looking for this plugin to list user whom have purchased the item and list them out in the front end on the specific product page. It's like a purchase history that is visible to all user. Am i able to use the posts_table with product_id together and display the purchase history front end? Thanks

    • Hi, Weng Seng. Thanks for asking. I'm afraid listing users and the products they've purchased isn't a function of any of our plugins. If you are unable to find a plugin that allows you to do this specifically, you or your developer might need to implement this via a customization, coding, or custom plugin. If you're unfamiliar with this and don't have a developer who can do this for you, then I recommend that you post a job on Codeable where their pre-approved WordPress experts will send you a quote. Thanks!

Please share your thoughts...

Your email address will not be published. Required fields are marked *