Custom Order Numbers for WooCommerce

Rated 5.00 out of 5 based on 1 customer rating
(1 customer review)

Enable sequential order numbering in WooCommerce; set custom number prefix, suffix and number width.

Clear
Author: tychesoftwares SKU: N/A Category: Tags: , Version: 1.2.4; Last updated: 1 month ago; Requires WordPress version: 4.4; Tested up to: 4.9

Description

This plugin is a premium version of free "Custom Order Numbers for WooCommerce" plugin.

Plugin lets you set custom order numbers in WooCommerce.

Main features:

  • WooCommerce order numbers can be sequential, random or by order ID.
  • Sequential counter can be set to automatically reset on daily, monthly or yearly basis.
  • Custom numbers will be assigned to new orders automatically.
  • There is also a tool to renumerate (i.e. recount) existing orders.
  • Optionally you can add prefix, suffix, date prefix, date suffix to order number.
  • You can set order number width.
  • Fully customizable order number template.
  • You can also enable order tracking by custom number and admin order search by custom number.
  • Manual order number counter.

Custom Order Numbers Options

Plugin settings are accessible through WooCommerce > Settings > Custom Order Numbers.

Custom Order Numbers for WooCommerce - Admin Settings - General Options

Order numbers counter
Possible values: Sequential; Order ID; Pseudorandom - crc32 Hash (max 10 digits).
Default: Sequential
Sequential: 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
Sequential: Reset counter
This will be ignored if sequential order numbering is disabled. Possible values: Disabled; Daily; Monthly; Yearly.
Default: Disabled
Reset counter value
Counter value to reset to. This will be ignored if Sequential: Reset counter option is set to Disabled.
Default: 1
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. E.g. try: Y-m-d- or mdy.
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 as 00001 instead of 1. Leave zero to disable.
Default: 0
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 Order Number Date Prefix, value is passed directly to PHP `date` function.
Default: None
Order number template
Replaced values: {prefix}, {date_prefix}, {number}, {suffix}, {date_suffix}.
Default: {prefix}{date_prefix}{number}{suffix}{date_suffix}
Enable order tracking by custom number
Default: yes
Enable order admin search by custom number
Please note that this will enable searching by number part only. That is: if, for example, you have set prefix to QWERTY and some order’s custom number is QWERTY456789, then searching can be done by 456789 only (i.e. without the prefix).
Default: yes
Manual order number counter
This will add Order Number meta box to each order’s edit page. Order Numbers Counter must be set to Sequential.
Default: no
Hide Renumerate Orders admin menu for roles
Hide Renumerate Orders admin menu for selected user roles. All user roles are listed here – even those which do not see the menu by default.
Default: None
Hide Custom Order Numbers admin settings tab for roles
Hide Custom Order Numbers admin settings tab for selected user roles. Tab can not be hidden for administrators. All user roles are listed here – even those which do not see the tab by default.
Default: None

Tips & Tricks

If you need to display modified (i.e. custom) order number in PHP:

// `$original_order_number` (i.e. order ID) can be `false`, if you are displaying custom number for the *current* order
$order = wc_get_order( $original_order_number );
echo $order->get_order_number();

Getting original order ID from the modified order number is more complicated:

function get_order_id_by_order_number( $order_number ) {
	foreach ( wc_get_orders( array( 'limit' => -1 ) ) as $order ) {
		if ( $order->get_order_number() == $order_number ) {
			return $order->get_id();
		}
	}
	return false;
}

Prices & Licenses

Single siteUnlimited sites
1 year$19.99$49.99
Lifetime$49.99$99.99

Refunds

We want to ensure that you are 100% happy with your purchase, so if you feel the product(s) you purchased are not the best fit for your requirements and you attempted to resolve issues with product's author, we are offering 30 day money back guarantee refund policy.

1 review for Custom Order Numbers for WooCommerce

  1. Rated 5 out of 5

    Jean-Luc

    Thanks for this great plugin – even free version is perfect – Pro is even better…

Add a review

12 thoughts on "Custom Order Numbers for WooCommerce"

  1. elliott October 17, 2017 at 9:36 am #

    Hi,

    The order numbers do change on the WooCommerce, but whe I export orders the old post-ID comes out as the order number column.

    Is this something that includes on the Pro version?

    BR
    //Elliott

    Reply

    • Steve November 18, 2017 at 1:56 am #

      any answer on this? We do a daily web import to our quickbooks server and I need the order numbers to match woocommerce. Happy to buy the Pro version is this is the case…

      Reply

  2. Matt January 18, 2018 at 6:26 pm #

    I have this exact problem as well.

    Reply

  3. paraaf January 19, 2018 at 3:28 pm #

    Hi,

    My client wishes to start renumbering each year in this format: C218001 where 18 is the current year and 1 the first order.
    Is that possible with this plug-in?

    Thanks!

    Reply

  4. Alex Lp April 16, 2018 at 4:05 pm #

    Hello, the free plugin version works great, but in the email that the client receives, there is an error that appears before the Order number and table in the email that is sent to the user, how can i fix that?

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘WC_Order’ does not have a method ’email_instructions’ in /home/xxxx/public_html/xxxxxx.com/wp-includes/class-wp-hook.php on line 288

    Reply

  5. Zsuzsi May 9, 2018 at 11:43 am #

    Hi,

    could you help me? I started to you your plugin to renumerate my orders, but I use the Wocommerce Product Attachment plugin because I need some attachement at my products. So with this plugin at the end of the order, every single product’s attachment is been able to download. When I turn in your plugin at the attachement I got a Fatal errol message.
    Could you help me how can I solve it?
    Here is the picture about it:

    Reply

  6. manesvenom June 27, 2018 at 8:48 am #

    Hi,

    Is it possible to add a feature to reset the counter based on a date in additional to the field of Sequential: Reset counter?

    If I select monthly, then I can input a date , such as 15, meaning the counter will be reset on 15 of every month.

    if I select yearly, then I want to input a date, such as 1-Aug, meaning the counter will be reset on 1-Aug every year.

    Reply

    • Tom Anbinder June 28, 2018 at 3:17 pm #

      Hi,

      Unfortunately there is no way to set this date now, but this seems like an interesting idea, so I will add it in next version.

      Best regards,
      Tom

      Reply

  7. exotravel July 3, 2018 at 9:40 am #

    I got the plugin for the random numbering. How to limit the character count produced? The pseudorandom order numbers counter says it produces a max of 10 digits, but how can you limit that to 6 only? I set the Order number width to 6 but that has no effect

    Reply

  8. Sabina Stroescu July 5, 2018 at 12:23 pm #

    Hi
    I have installed the free version of this plugin
    Somebody is placing fake orders on my website in order to check sales volume
    I have changed the order number to random thanks to your plugin, but it does not apply to the check-out URL, which shows the “real” order number
    Can the Pro version help me in that aspect?
    Thank you,
    Sabina

    Reply

  9. Varun September 27, 2018 at 6:47 am #

    How can we get Original Order Id by Order Number provided by you.

    Reply

    • Tom Anbinder September 27, 2018 at 7:15 pm #

      Hi,

      I’ve just added a snippet to the “Tips & Tricks” section (get_order_id_by_order_number() function). Not sure if it’s the only way, but I can’t think of another one.

      Please take a look and let me know if you have any questions/notes.

      Reply

Leave a Reply

Changelog

= 1.2.3 - 05/08/2018 =
* Feature - "Order number template" option added.

= 1.2.2 - 05/08/2018 =
* Feature - Sequential: Reset counter - "Reset counter value" option added.
* Feature - Hide "Renumerate Orders" admin menu for roles option added.
* Feature - Hide "Custom Order Numbers" admin settings tab for roles option added.
* Dev - Admin settings - Restyling.

= 1.2.1 - 30/07/2018 =
* Fix - %d replaced with %s in sprintf(), so numbers exceeding max integer would be handled correctly (for "Pseudorandom - crc32 Hash (max 10 digits)" option).

= 1.2.0 - 24/06/2018 =
* Feature - Order numbers counter - "Pseudorandom - crc32 Hash (max 10 digits)" option added.
* Fix - Unnecessary counter increase on non-sequential number counters fixed.
* Dev - "Reset section settings" option added.
* Dev - "Use MySQL transaction" option removed (now always set to yes).
* Dev - Settings saved as main class property.
* Dev - Admin settings descriptions updated.
* Dev - Plugin URI updated to wpfactory.com.
* Dev - Minor code refactoring.
* Dev - readme.txt updated.

= 1.1.2 - 09/03/2018 =
* Feature - "Sequential: Reset Counter" option added.

= 1.1.1 - 13/01/2018 =
* Feature - "Manual Order Number" option added.
* Dev - Confirmation (JavaScript) added for Renumerate Orders tool.
* Dev - "WC tested up to" added to plugin header.

= 1.1.0 - 24/07/2017 =
* Dev - WooCommerce v3 compatibility - Order ID and date.
* Dev - Link updated from http://coder.fm to https://wpcodefactory.com.
* Dev - Plugin header ("Text Domain" etc.) updated.

= 1.0.1 - 06/01/2017 =
* Fix - Translation domain fixed.
* Dev - Language (POT) file uploaded.

= 1.0.0 - 02/01/2017 =
* Initial Release.

Installation

  • Buy the plugin 🙂
  • Download plugin's zip to your computer (you will receive an email with download link, or you can always download the plugin from your account).
  • Go to Admin Dashboard > Plugins > Add New > Upload Plugin and browse for downloaded zip file.
  • If plugin is successfully installed - you should see it added to the Plugins list.

Updates

To keep WPCodeFactory items up to date, please install WPCodeFactory Helper plugin and enter your site key.