Skip to content

Instantly share code, notes, and snippets.

@WebEndevSnippets
Created November 13, 2012 16:48
Show Gist options
  • Save WebEndevSnippets/4066907 to your computer and use it in GitHub Desktop.
Save WebEndevSnippets/4066907 to your computer and use it in GitHub Desktop.
WooCommerce: Add Prefix to WooCommerce Order Number
add_filter( 'woocommerce_order_number', 'webendev_woocommerce_order_number', 1, 2 );
/**
* Add Prefix to WooCommerce Order Number
*
*/
function webendev_woocommerce_order_number( $oldnumber, $order ) {
return 'WE' . $order->id;
}
@MSATGroup
Copy link

Is there a way to do this before the payment gateway? I need the prefix to be used in the gateway as I will have multiple sites using the one gateway account.

@taiminenjani
Copy link

I have the same problem as GregorR1. Do you hapen to have solution for this?

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