Article WooCommerce

Why some orders disappear from the admin after enabling HPOS

A step-by-step debugging path for orders that end up in only one data store after switching on HPOS.

Hamid Aarab Senior WordPress and WooCommerce Backend Developer
Published
Reading time
1 min read

Hamid Aarab January 14, 2026 1 min read

تصویر پیکسلی دو جدول پایگاه‌داده که با فلش همگام می‌شوند
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_data output 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

Leave a Reply

Your email address will not be published. Required fields are marked *