Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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;
}
@GregorR1

This comment has been minimized.

Copy link

@GregorR1 GregorR1 commented Mar 29, 2018

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

This comment has been minimized.

Copy link

@taiminenjani taiminenjani commented Jun 6, 2019

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
You can’t perform that action at this time.