Prefix for order numbers
Order numbers show with a prefix, like WEB-1234, in emails, My account and the admin. The real order ID doesn’t change.
<?php
add_filter(
'woocommerce_order_number',
static fn( $number ) => 'WEB-' . $number
);
Good to know
Change WEB- to your prefix. Searching orders in the admin works with the number without the prefix.
In these packs
- WooCommerce: account, emails and admin: A leaner My account page, handier order lists and emails, and lighter pages.