As of WooCommerce 8.3, Cart and Checkout blocks are available as the default experience. WooCommerce Sequential Order Numbers Pro is now compatible with those blocks!
- Provides sequential order numbers rather than skipping values
- Start the order numbering at any number (or for shops with existing order numbers, any number greater than your current largest order number)
- Set a custom order number prefix or suffix
- Include the current day, month, or year in your custom order number prefix or suffix
- Include the current time: hour, minute, second in your custom order number prefix or suffix
- Order number length can be set, automatically adding as many zeroes to the beginning of the order number as needed
- Orders with only free products can be excluded from the paid order sequence for accounting purposes, and assigned their own custom prefix
- Download the extension from your WooCommerce dashboard
- Go to Plugins > Add New > Upload and select the ZIP file you just downloaded
- Click Install Now, and then Activate
- Go to WooCommerce > Settings > General, scroll down to “Order Numbers” and read the next section to learn how to setup and configure the plugin.
- Order Number Start
- This is the starting number for any newly placed orders. This can be used to start order numbering at an arbitrary point (ie 1000) as long as it is higher than the current largest order number, or can be used to advance the order number in a shop with existing orders. For instance, if the current highest order number is 24 and this is set to 500, the next orders placed will be: 500, 501, 502, etc.
- You can also control the order number minimum length by including leading zeroes to pad your order numbers with at least that many zeroes and achieve a fixed length. For instance, setting the order number start to “00001” will result in the following order number sequence: 00001, 00002, 00003, etc.
- Changing this setting does not affect existing orders!
- Order Number Prefix
- Allows you to set a custom order number prefix; this can contain any combination of characters, or patterns as described below. Setting this does not affect existing orders.
- Order Number Suffix
- Allows you to set a custom order number suffix; this can contain any combination of characters, or patterns as described below. Setting this does not affect existing orders.
- Skip Free Orders
- With this enabled, orders with only free products and no additional fees or costs will be excluded from the paid order sequence. Useful when required by certain accounting rules.
- Free Order Identifier
- This option is only available when the Skip Free Orders option is enabled. This allows you to set a prefix for the free orders numbering sequence so you can have for instance: FREE-1, FREE-2, FREE-3, etc.
- Day of the month without leading zeros
- Day of the month, 2 digits with leading zeros
- Numeric representation of a month, without leading zeros
- Numeric representation of a month, with leading zeros
- A two digit representation of a year
- A full numeric representation of a year, 4 digits
- 24-hour format of an hour without leading zeros
- 24-hour format of an hour with leading zeros
- Minutes with leading zeros
- Seconds, with leading zeros
WOO-1234-2015 in WooCommerce, Authorize.net AIM (a compatible plugin) will display this order number in my Authorize.net account as well. A compatible plugin can accept and use the formatted order number where relevant instead of the order ID.
This list is by no means exhaustive, but lists some of the plugins that are known to be compatible with the Sequential Order Numbers plugin:
- WooCommerce Subscriptions (for orders, not subscriptions themselves)
- WooCommerce Pre-Orders (for orders, not pre-orders themselves)
- Customer/Order/Coupon CSV Import Suite
- Customer/Order CSV Export
- ANZ eGate Payment Gateway
- Authorize.net AIM Payment Gateway
- Authorize.net CIM Payment Gateway
- Authorize.net DPM Payment Gateway
- Authorize.net SIM Payment Gateway
- Beanstream Payment Gateway
- Braintree Payment Gateway
- Chase Paymentech
- CyberSource Payment Gateway
- CyberSource SOP Payment Gateway
- CyberSource eCheck SOP Payment Gateway
- Elavon VM Payment Gateway
- FirstData Payment Gateway
- FreshBooks for WooCommerce
- GoCardless Payment Gateway
- Intuit QBMS
- Mollie Payment Gateway
- Moneris Payment Gateway
- NETbilling Payment Gateway
- Nochex UK Payment Gateway
- PayLeap Payment Gateway
- PayMill Payment Gateway
- PayPal Pro Payment Gateway
- PayPoint Payment Gateway
- PayTrace Payment Gateway
- Paytrail Payment Gateway
- Pin Payments Gateway
- PsiGate Payment Gateway
- Realex Payment Gateway
- Realex Redirect Payment Gateway
- SagePay Form Payment Gateway
- SecureTrading Payment Gateway
- Servired/RedSys Spain Payment Gateway
- Stripe Payment Gateway *
- TrustCommerce Payment Gateway
- USA ePay Payment Gateway
- Wirecard Payment Gateway
- WooCommerce Zapier
Other compatible plugins
Adding compatibilityNote that even if you don’t see your favorite plugin or gateway listed here, it doesn’t necessarily mean that the plugin isn’t compatible. Compatibility can be added to nearly any plugin or gateway – we advise getting in touch with the author of the plugin if it’s not compatible, and be sure to ask nicely! This list is by no means exhaustive, but lists some of the gateways that are known, due to gateway limitations, to be unable to support sequential order numbers with the Sequential Order Numbers Pro plugin:
- Apple Pay via Stripe
- PayPal Payments Advanced
- PayU Turkey
WOO-1234-2015, an incompatible gateway will not show this, but will instead show the order ID (the non-sequential number), such as
If you want to look up an order in WooCommerce, you can typically use:
wc_get_order( $order->id )However, when Sequential Order Numbers Pro is in use, you may need to work backwards from the order number instead of the order ID. In this case, you can get the order ID easily by using:
$order_id = wc_seq_order_number_pro()->find_order_by_order_number( $order_number );This will return the correct order ID from the order number. You can then use the order ID to get order information as needed. Version 1.7.0 of this plugin added a “performance mode” for shops with an extremely large number of orders. Please note: If enabled, a better performing (but potentially less accurate) means is used to generate the order number sequence. This is useful for shops with huge databases (i.e., over 100,000 orders) that receive several orders each second (i.e., more than 10 orders per second), and have experienced negative performance issues while generating orders. These metrics will vary based on your site’s hosting environment, and performance mode isn’t needed for most large shops. The main potential drawback to having performance mode enabled is that, when deleting the most recent order, that order number will not be automatically re-used. This can be be a positive or negative depending on your country’s accounting laws. You should only enable this if you know what you’re doing. If you’re not sure that performance mode is a good fit for your shop, please get in touch via the help desk with any questions. Performance mode can be enabled via filter:
add_filter( 'wc_sequential_order_numbers_performance_mode', '__return_true' );Q: I tried setting the starting order number but it’s not being used. What’s the problem? A: If you’re operating in an environment with existing orders you must use a starting number which is greater than the biggest existing order number. This is done so that historical order numbers are not altered.
Q: I’ve updated from the free version to this paid version but my order numbers aren’t saving right. A: Please ensure that you only have Sequential Order Numbers Pro active. Having both plugins active can cause a conflict that will result in your order numbers not respecting your settings.
Q: This is supposed to be compatible with the Order CSV Import Suite, but my Sequential Order Numbers are not showing. How do I fix this? A: You’ll need to set both the
order_number_formatted as described in our CSV Import Docs, as the “order_number” corresponds to the order id.
Q: This plugin works great, but the order numbers aren’t being used by plugin ___________, what gives? A: Third-party plugins can generally easily be made compatible with the Sequential Order Number Pro plugin. Get in touch with the particular plugin author and see if they would be willing to upgrade their plugin. Also verify that your gateway isn’t one of the few on the short list of gateways which due to technical limitations can not be made compatible.
Q: I’m a plugin author and I want to make my plugin compatible with WooCommerce custom order numbers so it will support the Sequential Order Numbers plugin, as well as any other plugin that modifies order numbers. How do I go about this? A: For most plugins this is an easy process, simply replace the post-id order number (ie
$order->get_order_number() anywhere that the order number is displayed.
When sending the order number to outside systems, such as payment gateways, you may want to use something like the following:
ltrim( $order->get_order_number(), __( '#', 'hash before order number', your-plugin-text-domain ) ) where the ltrim is used to cut off the leading hash that would otherwise be included (prior to WooCommerce 2.3). Orders are still looked up and handled internally by the underlying post id, so these changes are made only for display purposes.
Generally the only time that adding support gets tricky is with redirect-based payment gateways, since you need to pass both the underlying post_id, for looking up the order on the post-back, as well as the get_order_number() value for displaying within the gateway order manager. Some gateways like CyberSource make it easy to pass custom fields, others like Braintree require the customer to register the custom field, and with still others it’s not even possible.
Q: Why does the URL refer to the Order ID and not the Sequential Order Number? A: The order ID in the URL is used to retrieve the correct order from the database and, while it is possible that other information could be used, it would require modification of WooCommerce core. It is not possible to use the number generated by Sequential Order Numbers Pro as there are too many possible order number variations that are not compatible with URL parameters – the hash for example. Have a question before you buy? Please fill out this pre-sales form. Already purchased and need some assistance? Get in touch with support via the help desk.