Phone Orders For WooCommerce

Add tracking information to orders history

Phone Orders adds a Shipment Tracking column to the customer’s order history page. This guide provides two PHP filters that insert the tracking information into the table, making it visible to customers when they view their past orders.

Prerequisite: This feature works only in Run at frontend mode (you find it in Phone Orders > Settings > Run at frontend settings tab). Before using this code, you must install and activate the WooCommerce Shipment Tracking plugin.


The Complete Code Snippet

Copy and paste the following code into your child theme’s functions.php file or via the Code Snippets plugin.

How the Code Works

FilterPurpose
wpo_order_history_customer_table_headersInserts a new column header labelled Shipment Tracking immediately after the Status column. The escape => false parameter allows the column to contain HTML links.
wpo_order_history_customer_table_rowPopulates the Shipment Tracking column with the actual tracking information (carrier name, tracking number, and a clickable tracking URL) by calling the get_shipment_tracking_column() method from the Shipment Tracking plugin.

Why You Need This Code

The WooCommerce Shipment Tracking plugin stores tracking data in the order, but by default, this information does not appear on the customer’s Order History page. Customers must click into each order individually to see the tracking details. The code adds a dedicated column to the main order history table, giving customers a quick overview of all their shipments.


Step‑by‑Step Implementation

  1. Install and activate the WooCommerce Shipment Tracking plugin.
  2. Copy the code snippet.
  3. Install and activate the free Code Snippets plugin.
  4. Go to Snippets → Add New.
  5. Give the snippet a title, for example “Phone Orders – Shipment Tracking Column”.
  6. Paste the code into the Code text area.
  7. Set the “Run snippet” option to “Run everywhere”.
  8. Click Save Changes and Activate.

Testing the Integration

  1. Create a test order.
  2. Add shipment tracking information to the order (via WooCommerce → Orders → Edit Order → Shipment Tracking).
  3. Log in as a customer and go to My Account → Orders.
  4. Locate the order and check the Shipment Tracking column. The column should display the carrier name and a clickable tracking number.

Have questions? Please submit a support request. We're always happy to help!

Phone Orders
for WooCommerce
PRO

From $120
Buy
✓ 30-day money-back guarantee