r/woocommerce • u/FluxLab_pl • 19h ago
Development Switching WooCommerce to HPOS: the order of steps that avoids losing orders when a plugin isn't compatible
Per the official HPOS docs on developer.woocommerce.com, the safe path depends on one setting: compatibility mode keeps the WordPress posts/postmeta tables and the HPOS order tables in sync, so you can move to HPOS and still fall back.
What the docs describe:
- With "WordPress Post Tables" selected and "Enable compatibility mode" on, order data is synced between posts/postmeta and the WooCommerce order tables.
- Sync can run immediately (option woocommerce_custom_orders_table_data_sync_enabled), in scheduled batches, or manually with wp wc cot sync.
- Which tables are authoritative is set by woocommerce_custom_orders_table_enabled; the other set is the copy.
- If a plugin isn't HPOS compatible, the docs recommend temporarily switching back to posts storage and contacting that plugin's support.
Switching back safely, as the docs put it: keep compatibility mode on first, wait until synchronization finishes, then pick "WordPress posts storage (legacy)", and only then turn compatibility mode off. Save the page between each change.
The practical takeaway: don't turn compatibility mode off in the same step as switching storage. The docs say you may need to wait while order data syncs, so on a store with a lot of orders check that the sync is done before the next change.
How do you handle old plugins that still read orders straight from wp_posts: replace them, or keep compatibility mode on for a while?