WooCommerce HPOS compatibility: what it means for your plugins and how to migrate safely
HPOS stores WooCommerce orders in dedicated tables instead of the shared WordPress posts tables. It has been the default for new stores since WooCommerce 8.2 (October 2023); older stores switch manually. What breaks in legacy code, how to check compatibility and migrate safely.
5 min read
In this article
HPOS (High-Performance Order Storage) moves WooCommerce orders out of the shared WordPress posts table (wp_posts) and its metadata table (wp_postmeta) into dedicated, indexed order tables. It has been enabled by default for new stores since WooCommerce 8.2 in October 2023; older stores have to switch it on themselves, and the usual blocker is one or more plugins that still read orders the old way. Migration can be done safely: back up, fix incompatible plugins, run in compatibility (sync) mode, test, and only then make HPOS the authoritative store.
This guide is for store owners who see an "incompatible plugins" notice in WooCommerce's settings, and for developers maintaining older custom code.
What changes with HPOS
| Legacy (posts) storage | HPOS | |
|---|---|---|
| Where orders live | wp_posts (type shop_order) + wp_postmeta |
wp_wc_orders, wp_wc_orders_meta, wp_wc_order_addresses, wp_wc_order_operational_data |
| Admin order search | through the shared posts table | through dedicated, indexed order tables |
| How code should read orders | often get_post_meta() and WP_Query |
WooCommerce CRUD: wc_get_order(), wc_get_orders() |
| Default | before WooCommerce 8.2 | for new stores from 8.2 |
The benefit is less load on the shared posts table and faster order operations, especially for stores with tens of thousands of orders. The risk is legacy code that reads orders straight from wp_posts and wp_postmeta and simply cannot see them under HPOS.
Checking whether your plugins are HPOS-compatible
Go to WooCommerce → Settings → Advanced → Features. If any active plugin has not declared HPOS compatibility, WooCommerce lists it and won't let you enable HPOS; the Plugins screen can also be filtered to show incompatible plugins. For each one:
- Update it — most maintained plugins declared compatibility long ago.
- Check the vendor's changelog or support pages for HPOS plans.
- Find an alternative if the plugin is abandoned.
- Fix it if it is custom code or a theme snippet (see below).
What breaks in legacy code
get_post_meta( $order_id, … )for order data returns empty values under HPOS.update_post_meta()on an order writes somewhere WooCommerce no longer reads.WP_Querywithpost_type => 'shop_order'finds no orders.- Raw SQL against
wp_posts/wp_postmetafor orders makes reports show zeros. - Meta boxes registered for the
shop_orderscreen disappear, because the HPOS order screen has a different ID.
How it gets fixed
Following WooCommerce's own documentation:
- Load orders with
wc_get_order( $id ), notget_post( $id ). - Use
$order->get_meta(),$order->update_meta_data(),$order->delete_meta_data()and then$order->save()— saving is relatively expensive, so call it once. - Query with
wc_get_orders()orWC_Order_Query, notWP_Query. - If raw SQL is unavoidable, check the active storage with
OrderUtil::custom_orders_table_usage_is_enabled(). - For meta boxes, get the screen ID from
wc_get_page_screen_id( 'shop-order' )and make the callback accept either aWP_Postor aWC_Order.
Once fixed, the plugin declares compatibility in its main file:
add_action( 'before_woocommerce_init', function () {
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
}
} );
Declaring compatibility without doing the fixes is the worst option: WooCommerce stops warning you, and data quietly goes missing from reports and integrations.
A safe migration in seven steps
- Full backup of files and database — and a tested way to restore it.
- A staging copy with real orders; every step happens there first.
- Resolve incompatible plugins by updating, replacing or fixing them.
- Turn on compatibility mode. WooCommerce keeps orders in both stores and synchronises them, with one authoritative and the other as backup. Wait for the sync to finish — on large stores this can take a while. WP-CLI's
wp wc cot syncruns a manual sync. - Make HPOS authoritative, keep sync on, then test: a new order with every payment method, status changes, refunds, admin search, reports, your invoicing plugin, webhooks and integrations (CRM, accounting, carriers).
- Repeat on the live store in a quiet period — never in the run-up to Black Friday.
- After a few trouble-free weeks, sync can be switched off. To roll back: enable sync, wait for it to complete, then select legacy posts storage.
When not to rush
If the store is small, everything works and a critical plugin isn't compatible yet, wait for its update — but don't wait forever. New WooCommerce and extension releases increasingly build features for HPOS only. And never migrate during peak season.
What drives the cost
How many plugins are incompatible and whether they are custom (code needs fixing) or off-the-shelf (update or replace), how many integrations need retesting, and order volume. Send us your list of active plugins and your WooCommerce version, and we will reply within 24 hours with a scope, estimate and timeline: contact us. More on WooCommerce maintenance.
What to do tomorrow
Open WooCommerce → Settings → Advanced → Features and note which storage is active and whether any plugins are flagged. If some are, mark which ones were written for you — those are the developer's first job. If none are, schedule the migration for your next quiet month.
FAQ
Is HPOS mandatory?
It has been the default for new stores since WooCommerce 8.2. Existing stores can stay on legacy storage for now, but the direction is clear — migrating on your own schedule beats being forced to.
Will I lose orders when switching to HPOS?
Not if you migrate through compatibility mode and let the sync complete. That is exactly what it exists for: one store is authoritative, the other a live backup.
Why can't I enable HPOS?
Almost always because at least one active plugin hasn't declared compatibility. The Features settings screen tells you which.
Does HPOS make WooCommerce faster?
Mainly for order operations and admin order search, especially on stores with many orders. It does little for product page speed.
Will my custom code work with HPOS?
If it reads orders through wc_get_order() and order object methods, usually yes. If it uses get_post_meta(), WP_Query or raw SQL on orders, fix it before you migrate.