Created
July 13, 2014 11:56
-
-
Save jmslbam/e23c5b1242986b91d691 to your computer and use it in GitHub Desktop.
Change WooCommerce ordernumber prefix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This doesn't work for me Jaime. WC V2.3.9
Any ideas why would be appreciated.