Skip to content

Instantly share code, notes, and snippets.

@jmslbam
Created July 13, 2014 11:56
Show Gist options
  • Save jmslbam/e23c5b1242986b91d691 to your computer and use it in GitHub Desktop.
Save jmslbam/e23c5b1242986b91d691 to your computer and use it in GitHub Desktop.
Change WooCommerce ordernumber prefix
add_filter( 'woocommerce_order_number', 'jm_woocommerce_order_number', 1, 2 );
/**
* Remove # prefix from WooCommerce Order Number
* Could also be done with gettext: https://github.com/woothemes/woocommerce/blob/master/includes/abstracts/abstract-wc-order.php#L537
*
*/
function jm_woocommerce_order_number( $oldnumber, $order ) {
return str_replace('#', '', $order->id);
}
@mariokerkhof
Copy link

It worked! Thnx Jaime!

@davemtb2
Copy link

This doesn't work for me Jaime. WC V2.3.9
Any ideas why would be appreciated.

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