Edit or change order numbers in Woocommerce without a plugin

av tonny on 14/01/2015

Are you tired of all that plugins you need to edit or change anything in Woocommerce? Sure I am, anything costs too much.
The reason that I write this post is that I wanted my order numbers start in a new series. My order numbers was 1016, 1017 and so on. I needed the numbers to be in a series like 61016, 61017 and so on.

So I rearched and did only find the Woocommerce plugin “Sequential Order Numbers Pro” witch costs $49 for a single site. Not good for such a small edit. (You can also get that plugin form suspect sites like WooGang for $10 or $15, but you shouldnt buy there, they could be full of viruses and back doors to your WP admin.)

So I decided to dig into the database to make the changes. And it was easy. I followed these steps:

1. I made a new fake order in woocommerece, the order number became 1018
2. I logged into phpMyAdmin
3. I searched all tables for 1018
4. I edited this tables:

– dfE4_posts
– dfE4_woocommerce_order_itemmeta
– dfE4_woocommerce_order_items

How did I edit those tables?
I opened each table and just replaced the number 1018 with the number 61018 (witch is the number I needed my new series to start with).

5. Made a new fake order to check what the next order number would be.
6. Did not delete that fake orders so that when a real order was placed that order would have the order number 61019. Then I deleted my fake orders.

{ 2 kommentarer… les dem eller skriv en selv }

Dan Mackison 08.25.15 at 01:34

How did changing the number remove the way that Woocommerce randomizes order numbers? I feel like a step is missing here.

tonny 08.25.15 at 08:15

Does it matter why it works, it works 🙂

BTW, as far as I know, Woocommerce does not randomize order numbers once you get your first order.

Skriv en kommentar

Du kan bruke disse HTML taggene og attributtene: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Previous post:

Next post: