Audit the existing plugin for any direct wpdb queries against wp_posts or wp_postmeta that reference order post types, and list all raw SQL order data access patterns
Replace direct post meta queries with WooCommerce CRUD methods using wc_get_order(), $order->get_meta(), and the WooCommerce Orders data store abstraction layer
Declare HPOS compatibility in the plugin by hooking into the woocommerce_feature_compatibility method and calling FeaturesUtil::declare_compatibility with the custom_order_tables feature
Use WooCommerce's wc_get_orders() with the appropriate args array instead of get_posts() or WP_Query with post type shop_order for any order list queries
Test the plugin in a staging environment with HPOS enabled and the compatibility mode (sync) turned on, verifying order creation, retrieval, and meta updates work correctly via the HPOS tables
Run WooCommerce's built-in HPOS migration to move existing orders to the custom order tables, monitoring for migration errors on orders with non-standard meta structures
Known gotchas
WooCommerce compatibility mode (syncing between posts table and HPOS tables) adds write overhead; once all plugins are HPOS-compatible, disable sync to reclaim performance
Plugins that use action hooks on save_post for order post types will not fire for HPOS orders; migrate to woocommerce_new_order and woocommerce_update_order hooks instead
Direct SQL queries against wp_wc_orders (the HPOS table) bypass CRUD events and caching; always prefer the data store abstraction to avoid stale cache issues
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp