Phone Orders For WooCommerce

Differentiate phone orders

This guide is part of the developer documentation for the Phone Orders for WooCommerce plugin. It explains how to differentiate between orders that have been manually entered via the phone order interface and those placed directly by customers on the website.

By default, WooCommerce does not distinguish between these two types of orders. However, many store owners need this distinction for auditing, reporting, or integration with external systems like accounting software. The code sample provided here shows how to add a visible prefix. For example, “PH”—to the order number of every phone order, making it instantly recognisable.

What Problem Does This Solve?

When a store receives orders through multiple channels (website, phone, in‑person, etc.), it is often necessary to separate them for:

  • Accounting and reconciliation – Phone orders may use different payment methods or require manual invoice processing.
  • Reporting and analytics – Understanding which channel generates the most revenue or requires additional staffing.
  • Fulfilment workflows – Phone orders might include special instructions or custom pricing that deserve extra attention.
  • Customer service – Agents can quickly recognise a phone order and review any notes added during the call.

The code below adds a custom prefix to the order number of any order created through the Phone Orders interface. The prefix can be customised to any string (e.g., “PHONE-“) and the same technique can be adapted to add a suffix instead of a prefix.


The Code: Adding a Prefix to Phone Orders

Place the following PHP snippet in your child theme’s functions.php file or through a code snippet plugin.

What this code does:

  • It attaches a custom function to the woocommerce_order_number filter, which controls how order numbers are displayed throughout WooCommerce (in the admin, order emails, customer accounts, etc.).
  • The function receives two parameters: the current order number ($num) and the full order object ($order).
  • It checks whether the order has a custom meta field called _wpo_order_creator. This meta key is added automatically by the Phone Orders for WooCommerce plugin to every order created through its interface.
  • If the meta field exists (i.e., the order was created by the phone order system), it adds the prefix PH to the beginning of the original order number.
  • The modified order number is then returned and used everywhere the order number is displayed.

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