Skip to content

Instantly share code, notes, and snippets.

View mariokerkhof's full-sized avatar

Mario Kerkhof mariokerkhof

  • Rotterdam
View GitHub Profile
@jmslbam
jmslbam / functions.php
Created July 13, 2014 11:56
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);
}