What Breaks When Migrating to WooCommerce HPOS?

Order data moving from WordPress's generic post tables to WooCommerce's dedicated HPOS tables, breaking anything that queried the old structure directly

Why This Migration Is Different

For years, WooCommerce stored orders as a special post type within WordPress's generic wp_posts table, which plugin developers could (and many did) query directly with custom SQL for reporting or integration purposes. HPOS moves orders to dedicated, purpose-built tables designed specifically for order data, which is faster and more scalable, but breaks any code that bypassed WooCommerce's official order APIs to query the old table structure directly.

Where Problems Show Up

  • Custom reporting or dashboard code written with direct SQL queries against wp_posts for order data, rather than using wc_get_orders() or similar official functions.
  • Older or less actively maintained extensions that haven't been updated for HPOS compatibility, which WooCommerce's own compatibility checker generally flags before allowing migration, but not always exhaustively.
  • Custom order meta handling written against the old storage assumptions, which may need updating to use WooCommerce's order object methods consistently.
  • Third-party analytics or export tools configured to pull data from the old table structure directly.

How to Migrate Safely

  1. Run WooCommerce's built-in HPOS compatibility checker first, addressing any flagged incompatible plugins before proceeding.
  2. Review any custom code for direct database queries against order-related tables, updating them to use official WooCommerce order APIs instead.
  3. Test the migration on a staging copy first, checking every custom integration, report, and extension thoroughly before migrating live.
  4. Keep the compatibility mode available (WooCommerce supports running both old and new storage in sync during a transition period) if a full cutover isn't ready yet.

Need help auditing custom code and safely migrating to HPOS? See custom WooCommerce development.

Available for new projects

NEXT STEP

Rather have it fixed than keep reading?

Based in Bangladesh — serving clients worldwide. Tell me what's happening and you'll have a reply within one working day.

  • Reply within one working day
  • Fixed quote before work starts
  • UK, EU and US hours covered