Skip to content

Instantly share code, notes, and snippets.

@mikejolley
Created April 7, 2012 11:57
Show Gist options
  • Save mikejolley/2328155 to your computer and use it in GitHub Desktop.
Save mikejolley/2328155 to your computer and use it in GitHub Desktop.
WooCommerce - Custom order number (in 1.5.3+)
add_filter( 'woocommerce_order_number', 'custom_woocommerce_order_number', 1, 2 );
function custom_woocommerce_order_number( $oldnumber, $order ) {
return 'CUSTOMPREFIX' . $order->id;
}
@vinamelody
Copy link

But Mike, i put this in functions.php and my order number keeps changing.

@nainag143
Copy link

How to prefix order date and customer name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment