Contents (3)
High-Performance Order Storage (HPOS) moves orders out of wp_posts into dedicated tables. With compatibility mode on, WooCommerce keeps both copies — and that is where mismatches begin.
Incomplete synchronisation
If background sync has stalled, the two stores drift apart. Measure first, then run the sync manually.
wp wc cot sync --batch-size=200
wp wc cot verify_cot_data --verbose
Take a database backup before any change, and run these commands on staging first.
A plugin that still treats orders as posts
Plugins that read orders with get_posts() or WP_Query, or create them with wp_insert_post(), update only one side under HPOS. Use the WooCommerce CRUD API instead:
$order = wc_get_order( $order_id );
$order->update_meta_data( '_erp_reference', $reference );
$order->save();
The problem is rarely HPOS itself; it is code that still assumes an order is a post.
Diagnosis checklist
- Check every plugin’s compatibility on the WooCommerce Features screen.
- Keep the
verify_cot_dataoutput for mismatched orders. - Search custom code for direct queries against
wp_postmeta. - Do not turn compatibility mode off until every mismatch is resolved.
$ ./request_review
Facing the same problem in your own store?
Senior WordPress and WooCommerce backend engineering for complex production problems.
Request a Technical Assessment
## Comments