
WooCommerce Custom Order Numbers
WooCommerce sequential order numbering, custom order number prefix, suffix and number width
Description
Now order numbers are sequential and customizable. Have you experienced or are you experiencing random order numbers being generated when customers purchase from your WooCommerce store? WooCommerce Custom Order Numbers module will help you set things straight! Enable this module to organize your future orders so each one is sequential. With this module you can:
- Set the next (i.e. first) order number to get things back in line (and, if you wish, renumerate all existing WooCommerce orders).
- Add a custom order number prefix, date prefix and/or suffix of your choosing.
- Define the custom order number width.
- Enable WooCommerce order tracking by custom number.
Order Numbers Module Options
Order Numbers
This section lets you enable sequential order numbering, set custom number prefix, suffix and width.
- Number Generation
- Possible values are: sequential; order ID; random.
- Default:
Sequential
- Default:
- Next Order Number
- This will be ignored if sequential order numbering is disabled. Next new order will be given this number. Use Renumerate Orders tool for existing orders.
- Default:
1
- Default:
- Order Number Custom Prefix
- Prefix before order number (optional). This will change the prefixes for all existing orders.
- Default: None
- Order Number Date Prefix
- Date prefix before order number (optional). This will change the prefixes for all existing orders. Value is passed directly to PHP
date()
function, so most of PHP date formats can be used. The only exception is using\
symbol in date format, as this symbol will be excluded from date. Try:Y-m-d-
ormdy
.- Default: None
- Order Number Width
- Minimum width of number without prefix (zeros will be added to the left side). This will change the minimum width of order number for all existing orders. E.g. set to
5
to have order number displayed as00001
instead of1
. Leave zero to disable.- Default:
0
- Default:
- Order Number Custom Suffix
- Suffix after order number (optional). This will change the suffixes for all existing orders.
- Default: None
- Order Number Date Suffix
- Date suffix after order number (optional). This will change the suffixes for all existing orders. Same as with date prefix, value is passed directly to PHP
date()
function, so most of PHP date formats can be used. The only exception is using\
symbol in date format, as this symbol will be excluded from date. Try:Y-m-d-
ormdy
.- Default: None
- Use MySQL Transaction
- This should be enabled if you have a lot of simultaneous orders in your shop – to prevent duplicate order numbers (sequential).
- Default:
yes
- Default:
- Enable Order Tracking by Custom Number
- Enables/disables order tracking by custom number.
- Default:
yes
- Default:
- Enable Order Admin Search by Custom Number
- Enables/disables order admin search by custom number.
- Default:
yes
- Default:
Orders Renumerate Tool Options
This section set options for the order renumerate tool.
- Sort by
- Set how you want orders to be sorted when using orders renumerate tool. Possible values: ID; Date; Last modified date; Random.
- Default:
Date
- Default:
- Sort Ascending or Descending
- Possible values: Ascending; Descending.
- Default:
Ascending
- Default:
Orders Renumerate Tool
Accessible through:
- WooCommerce > Settings > Booster > Shipping & Orders > Order Numbers
- WooCommerce > Booster Tools > Renumerate Orders
i cannot seem to disable the plugin. i feel as though i must be missing something obvious… but i haven’t had this happen on any other extensions that i’ve “reset”.
– i’ve tried unchecking and saving, with no luck
– i’ve tried resetting the order numbers module with the red button, but it refreshes the page with the checkbox checked
any other suggestions on what to try?
Hi Shannon,
Could you contact us directly at support@booster.io? Thank you.
Best regards,
Rokas – Support Team
Hi, we have been using this for a while and want to change our order numbers to start from a new number that is the same as our new invoicing system. I changed the number in Sequential: Next Order Number and changed the Number Generation from Order ID to Sequential and tried a test order but it’s not starting from the new number I put in. Can you help please?
Hi,
Could you contact us directly at support@booster.io? Thank you.
Best regards,
Rokas – Support Team
Is it possible to increment the order number by another random number? Such as 1 through 50?
Thanks!
Hi Rick,
Unfortunately that is not possible yet but we have added it to our todo list.
Best regards,
Rokas – Support Team
I am also keen to have each product SKU be part of the order number. I would be happy to use the first product UKU that is in the cart for the order number.
Can you tell me if this can be done?
Hi,
Just discovered this amazing piece of work!
A quick question.
So far I have only enabled the Custum Order Numbers. At this moment I am foremost interested in the use of the [wcj_order_number] shortcode that my client wants me to incorporate in a message on the Thank You Checkout page.
However, the shortcode does not produce any result.
Am I correct in thinking that I need to enable the PDF Invoice module for that? If so, that ‘s a bit of drawback in my case because I have already implemented that functionality in a different way.
Regarding the “Enable Order Admin Search by Custom Number” checkbox: I want to be able to search for both old order numbers AND custom numbers at the same time. If an order uses the new numbers, it should try to match; otherwise, it should try to match the original (WooCommerce) order number.
It seems the “Enable Order Admin Search by Custom Number” lets me do one or the other, but not both. Is there a fix for this?
The renumeration tool does not work properly. It renumbers orders in reverse order to all of my order numbers are now incorrect. For order numbers to be sequential an order made yesterday should have number lower than those made today..the reverse is happening.
Hello Abi,
did you find any solution?
Cheers,
Sebastian
Hi,
I’ve just rechecked and I’m not sure I can reproduce the issue – like you described, when using renumerate tool, orders from yesterday have lower number than orders made today. In renumerate tool orders are sorted by date of creation starting from the oldest order. Anyway – I’ve made some changes to the plugin and added some options so you could try it and see if issue can be solved. Please download the development version here – https://booster.io/dev/. You will need to uninstall the old plugin version first (don’t worry your saved settings won’t disappear). Now in “WooCommerce > Settings > Booster > Shipping & Orders > Order Numbers” I’ve added “Orders Renumerate Tool Options” section, so you can choose how you want orders to be sorted in renumerate tool. Please check it out and let me know if this solves it.
Best regards,
Tom
Hi Tom,
Before I purchase/install your plugin can you let me know if it is possible to create an order number custom prefix using a short code?
I’d like my order numbers to include the product SKU, so I’m thinking it would look like this…
[wcj_product_sku]####
Thanks in Advance,
Donal
Hi Donal,
Unfortunately that’s not quite possible at the moment. Order number prefixes and suffixes can contain shortcodes, but that would be mostly order shortcodes (e.g.
[wcj_order_date]
). As for products shortcodes, I’m not sure how this should work – what I mean is that order can contain multiple products, so it’s not clear which product SKU do you want to be in order number. Maybe you have an idea how to solve this? I can image only one solution – take order’s first product’s SKU. Would that be ok? If yes, I could implement this in plugin.Best regards,
Tom
A little plugin i’ve made on WordPress.org to fix this:
https://wordpress.org/plugins/wc-booster-search-order-by-custom-number-fix/
It’s the same as the github one but it’s easier to install
Hi Pablo,
Sorry for such a delayed reply. Thank you for the code, really appreciate it! I’ve added this (with some minor changes) to our plugin’s development version. If you wish to check it out (or add anything), please visit plugin’s GitHub page – https://github.com/algoritmika/woocommerce-jetpack. Again, thank you.
Best regards,
Tom
Hello.
I’m really glad you found my code useful! Thanks for the comments (https://github.com/algoritmika/woocommerce-jetpack/blob/master/includes/class-wcj-order-numbers.php#L56)
Actually I was thinking about a minor change. Instead of validating only the order number as numeric value, we could check exactly what the user wants, including suffixes and prefixes. Do you think it would be cool?
By the way, I am looking for a job right now. If you are interested, please let me know.
See you, thanks 🙂
Thanks for the feedback @Roland
I’ve just updated it so now it’s possible to search with leading zeros.
https://github.com/pablo-pacheco/wc-booster-search-order-by-custom-number-fix
I appreciate any github stars if you liked it 🙂
Thanks for the fast ‘fix’ to the fix haha. I’ve signed up to Github and starred your fix 🙂
Hey there,
First thanks for your wonderfull plugin! 🙂
I have the same problem as Jake
“after modifying how the Order number looks, it is now impossible to track the orders using the modified format, Is this a known issue?”
I installed the dev Booster. But i’ll keep the problem. Can you help me?
Thanks in advance!
Cheers,
Kaspar
I’ve just made a plugin to solve this problem. You can try it here.
https://github.com/pablo-pacheco/wc-booster-search-order-by-custom-number-fix
You just have to put it on your plugins folder.
Let me know if it helped you
You rock! I have the order numbers set to 5 numbers with a leading zero. This zero needs to be removed when searching or it can’t find the order, but other than that, this fix works perfectly!
The function of custom order numbers is working well, but it’s not possible to search any order with the “new” number. The orders search only accepts the default Woocommerce order number.
There is any way to make searchable this custom order numbers?
Thanks in advance.
I have the same issue as some of the people below.
I want booster to be able to send the “custom order number” when it talk to the payment gateway and not the default woocommerce order_id
For example my issue is that even with BACS payment (bank transfer) the default woocommerce order_id is sent and not the new custom “order number”
Maybe take a hint from the way paypal integrates the order_id info???
Hi, after modifying how the Order number looks, it is now impossible to track the orders using the modified format, Is this a known issue?
Hi Jake,
Yes, we’ve recently fixed that. Please download the development version here – http://booster.io/dev/. You will need to uninstall the old version first (don’t worry your saved settings won’t disappear). After that please make sure “Enable Order Tracking by Custom Number” option is enabled in module’s settings (as usual in “WooCommerce > Settings > Booster > Shipping & Orders > Order Numbers”).
Best regards,
Tom
I purchased your Booster product a few days ago looking to alter the order #’s in Woocommerce. I set the order #’s to start at 1000032, which reflects fine in Woocommerce, but the original order # (232) is being sent to my payment gateway. What can I do to have the new Booster provided order # sent to my payment gateway?
Hi,
Which payment gateway are you using?
Best regards,
Tom
Thanks for the quick reply Tom. I use WooCommerce Sage Payments USA Gateway, as well as the built in Paypal solution.
Didn’t test with Sage Payments yet, however PayPal should be ok. I’ve just retested on our test server and PayPal sandbox, and it seems to be fine – PayPal is displaying Booster’s modified order number and not original order ID. Could you please send me a screenshot from PayPal with wrong order number? My email is tom@booster.io.
Tom
Hi,
I have the same problem – my payment gateway sends the original order number (it is a post ID).
I was looking for a payment gateway plugin – I found this:
$order = new WC_Order($order_id);
$vs = str_pad($order_id, 10, “0”, STR_PAD_LEFT);
$vs is order number for payment gateway. Function “WC_Order($order_id)” not return the number from booster, bud real order number (post ID – becouse order is post).
What with that? Any idea?
Thanks.
Steve
Hi,
I solved the problem:
Orginal code in payment gateway plugin get Order ID
$vs = str_pad($order_id, 10, “0”, STR_PAD_LEFT);
I modified it to get Order Number
$vs = str_pad($order->get_order_number(), 10, “0”, STR_PAD_LEFT);
Now it works fine. If someone needed it.. 🙂
Steve
The custom order numbering works like a charm for the most part, but unfortunately it seems to be impossible to search orders by these ‘new’ numbers while the original WooCommerce order numbers are searchable. It would make life a lot easier if searching by custom order numbers was also possible.
Hey there!
First off, thanks for the plugin. The free version is awesome and the paid version is all but a sure thing. I don’t even need anything in the paid version that I can think of (yet…), but at $20, it’s a donation to the future development of this awesome tool. Thanks!
Just a quick question:
I’ve used the sequential orders option and started my orders at 1000. I then changed all previous orders to follow this format using the Remunerate Orders tool. However, on completing the Remunerate Orders procedure, my orders have the suffix “##” as opposed to “#”. I don’t suppose you know of a fix for this?
Cheers!
Greg
Hi Greg,
Thank you so much! And sorry for the delayed reply.
As mentioned in private email – I’m aware of the problem, will be fixed in next update.
Best regards,
Tom
Thanks Tom,
Awesome to hear it will be fixed next update.
Again, sorry for the double contact. I couldn’t find this page again, so worried I hadn’t submitted the comment!
Cheers!
Greg