WooCommerce HPOS: Switch Safely and Fix Incompatible Plugins

How to switch WooCommerce to High-Performance Order Storage (HPOS) safely, why plugins show as incompatible, and the code change that makes them compatible. Tested.

WooCommerce Order data storage setting with an incompatible plugin warning for HPOS

HPOS (High-Performance Order Storage) stores WooCommerce orders in their own database tables instead of WordPress posts. It has been the default for new stores since WooCommerce 8.2. Older stores switch over in WooCommerce → Settings → Advanced → Features: turn on compatibility mode, wait for the orders to sync, then choose High-performance order storage. WooCommerce won't let you switch while a plugin is marked incompatible, and that's usually the real blocker.

I tested the whole switch on WooCommerce 11.3, with a plugin that reads orders the old way. The surprise: compatibility mode hides broken plugins. The plugin kept working while sync was on and returned nothing once sync was off.

Why a plugin shows as "incompatible" with HPOS

In the Order data storage setting, WooCommerce lists plugins that block the switch:

WooCommerce Order data storage setting: WordPress posts storage (legacy) is selected, High-performance order storage is disabled, with the warning "1 Incompatible plugin detected (Order Email Report (test)). View and manage".

A plugin is listed if either of these is true:

  • It declared itself incompatible.
  • It never declared anything. For HPOS, WooCommerce assumes a plugin is incompatible unless it says otherwise (default_plugin_compatibility is incompatible for this feature). My test plugin had no declaration and blocked the switch.

Only plugins that WooCommerce treats as WooCommerce-aware are checked: those with a WC tested up to header. A plugin without that header isn't checked at all, even if it touches orders. So an empty list doesn't prove everything is safe. The Cart and Checkout blocks use the same compatibility system: see plugin not compatible with the WooCommerce Checkout block.

From the command line, wp wc hpos compatibility-info lists the plugins in three groups: compatible, incompatible and uncertain. My test plugin appeared as uncertain, which blocks the switch just like incompatible.

What actually breaks: a real test

The test plugin read the billing email of an order in two ways:

// The old way: order data read straight from post meta.
function oer_email_old( $order_id ) {
	return get_post_meta( $order_id, '_billing_email', true );
}

// The HPOS-safe way: through the order object.
function oer_email_new( $order_id ) {
	$order = wc_get_order( $order_id );
	return $order ? $order->get_billing_email() : '';
}

I made the plugin declare HPOS compatibility without fixing the old function, switched HPOS on and placed orders:

HPOS setting get_post_meta() (old) $order->get_billing_email()
HPOS on, compatibility mode on Correct email Correct email
HPOS on, compatibility mode off Empty Correct email

With compatibility mode on, WooCommerce copies every order back into the posts tables, so old code that reads post meta still gets data. Turn compatibility mode off and that code silently returns nothing. The reports, exports and emails built on it go blank, with no error anywhere.

That's why a plugin should only declare HPOS compatibility after its code is fixed, and why you should test with compatibility mode off before trusting a switch.

How to switch to HPOS safely

  1. Back up the database.
  2. Update every plugin and theme. Most order-related plugins have added HPOS support.
  3. Check the list under WooCommerce → Settings → Advanced → Features → Order data storage, or run wp wc hpos compatibility-info. For each incompatible or uncertain plugin: update it, check its documentation, ask its author, or replace it.
  4. Turn on compatibility mode (the "Enable compatibility mode" checkbox, or wp wc hpos compatibility-mode enable). WooCommerce creates the order tables and starts copying orders.
  5. Wait for the sync to finish. On big stores it runs in the background. On the command line, wp wc hpos sync does it in one go. In my test, it synced 10 orders in under a second.
  6. Switch to High-performance order storage (or wp wc hpos enable). Keep compatibility mode on for now.
  7. Test the things that read orders: the orders list, order emails, exports and reports, subscriptions, invoices and shipping labels. Then place a test order.
  8. Turn compatibility mode off once everything works, on staging first. Test again: this is where old code fails.

If WooCommerce refuses, it says why. These are the exact messages from my test, run before any setup:

Warning: [Failed] Some installed plugins are incompatible. Please review the plugins by going to WooCommerce > Settings > Advanced > Features and see the "Order data storage" section.
Warning: [Failed] The orders table does not exist and this is not a new shop. Please create the table by going to WooCommerce > Settings > Advanced > Features and enabling sync.
Warning: [Failed] There are orders pending sync. Please run `wp wc hpos sync` to sync pending orders.
Error: HPOS pre-checks failed, please see the errors above

Switching back

You can return to posts storage, but only when nothing is waiting to sync. In my test, wp wc hpos disable failed with "There are orders pending sync". After turning compatibility mode back on and running wp wc hpos sync, it switched back without errors. So keep compatibility mode on until you're sure you're staying on HPOS.

For developers: make a plugin HPOS-compatible

1. Read and write orders through WooCommerce, never through posts.

Instead of Use
get_post_meta( $order_id, '_billing_email', true ) wc_get_order( $order_id )->get_billing_email()
get_post_meta( $order_id, '_my_meta', true ) $order->get_meta( '_my_meta' )
update_post_meta( $order_id, '_my_meta', $value ) $order->update_meta_data( '_my_meta', $value ); $order->save();
get_posts( array( 'post_type' => 'shop_order' ) ) wc_get_orders( array( 'limit' => 20 ) )
new WP_Query( … 'shop_order' … ) or SQL on wp_posts wc_get_orders() with query arguments
get_post_status( $order_id ) $order->get_status()

2. Find the old calls. Search your plugin for get_post_meta, update_post_meta, shop_order, wp_posts and post_type near order code. Each one that touches orders needs the change above.

3. Declare compatibility, only after testing with compatibility mode off:

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 );
		}
	}
);

__FILE__ must be your main plugin file. If you declare from an included file, pass the main file's path instead. Also add a WC tested up to header to the plugin, so WooCommerce checks it at all.

4. Admin screens: if your plugin adds columns or boxes to the orders screen, hook into both screens. The legacy screen is edit.php?post_type=shop_order, and the HPOS screen is admin.php?page=wc-orders, which has its own hooks such as manage_woocommerce_page_wc-orders_columns.

FAQ

What is HPOS in WooCommerce?

High-Performance Order Storage. WooCommerce stores orders in dedicated tables (wp_wc_orders and related tables) instead of the WordPress posts and postmeta tables. It's faster for stores with many orders and is the default for new stores since WooCommerce 8.2.

Why can't I enable HPOS in WooCommerce?

Usually because a plugin is listed as incompatible, or because orders are still syncing. The Order data storage setting names the plugins, and wp wc hpos enable prints the exact reason.

Why does a plugin say it's incompatible with HPOS?

Either the plugin declared itself incompatible, or it never declared anything. For HPOS, WooCommerce treats plugins without a declaration as incompatible until their developer confirms support.

Is compatibility mode safe to leave on?

Yes. It keeps a copy of every order in the old tables, which makes switching back possible and keeps old code working. It also adds database writes for every order and hides plugins that still read post meta. Turn it off once everything is tested.

Can I switch back from HPOS?

Yes, once no orders are waiting to sync. Turn compatibility mode on, let it sync (or run wp wc hpos sync), then choose WordPress posts storage.

When to get help

If a plugin you depend on blocks HPOS, or you need custom order code converted, I can update it, test it with compatibility mode off on a staging copy, and switch your store over. See WooCommerce development. My WooCommerce plugins on the plugins page, including Halfway, Orderloft and Checkout Delivery Options, declare HPOS support.

Have a project in mind? Let’s talk.

Tell me what you are building and where you need support. I’ll respond with a clear, practical next step.

Start your project
  • Free audit
  • Fixed quote in USD
  • 50% upfront, 50% on delivery
  • 15 days free support
  • Reply within 24 hours