Skip to content
This repository was archived by the owner on Jun 15, 2022. It is now read-only.

Commit 16eef2a

Browse files
authored
Update and rename readme.md to README.md
Includes WP-CLI step for migrating orders from the shop_order post type into the woocommerce_order database table.
1 parent cd1ae96 commit 16eef2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readme.md renamed to README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Managed WooCommerce plugin for Liquid Web.
55
WooCommerce even with CRUD classes in core, still uses a custom post type for orders. By moving orders to use a custom table in the site database, will improve store orders performance.
66

77
### Here's how
8-
98
WooCommerce saves more than 40 custom fields per order— including those from plugins— inside the wp_postmeta table. If your store gets ~40 per day, that's 1600 rows (40 * 40) added to the postmeta table in a day.
109

1110
In one month that number can be 48,000 new rows (1600 * 30) added to your postmeta table. The more rows in a table the longer it will take for a query to execute. WooCommerce Order Tables creates a new table for WooCommerce orders which would cut that number tremendously by making each custom field into a column so that 1 order = 1 row.
@@ -15,4 +14,5 @@ This plugin uses a Composer autoloader. If you are working with code from the `m
1514

1615
The packaged version of this plugin, which is available in [releases](https://github.com/liquidweb/WooCommerce-Order-Tables/releases), contains the autoloader. This means that end users should not need to worry about running the `composer install` command to get things working. Just grab the latest release and go, but be sure to backup your database first!
1716

18-
17+
## How to use
18+
To be able migrate orders that are stored in the post type `shop_order` on your store, you will need to run a couple of WP-CLI commands. This plugin includes two WP-CLI commands, one is for getting how many orders have not been migrated yet into the order table `wp wc-order-table count`. The other WP-CLI command is to migrate the orders to the `woocommerce_order` database table, that command is `wp wc-order-table migrate --batch=500 --page=1`. So the default batch number of the orders to process is 1000, so you can adjust the batch number as needed.

0 commit comments

Comments
 (0)