HPOS Compatibility: Incomplete implementation in Invoicing tools
-
I am writing to report a technical conflict with High-Performance Order Storage (HPOS) when set to Authoritative Mode. While the plugin declares compatibility, several modules still rely on legacy WordPress meta functions and direct SQL queries to
postmeta, causing them to fail when data synchronization is disabled.After a code audit, I’ve identified several areas where the plugin bypasses the WooCommerce CRUD API:
1. Data Retrieval Failure (Invoicing/Display)
Inincludes/pdf-invoices/submodules/class-wcj-pdf-invoicing-display.php, lines 455 and 457 useget_post_meta()to retrieve order metadata (invoice numbers/dates).- Result: These return empty values in HPOS Authoritative mode because the data is stored in
wp_wc_orders_meta. - Fix: Please update these to use
$order->get_meta().
2. Data Persistence Failure (Core Invoicing)
Inincludes/classes/class-wcj-invoice.php, lines 123 and 124 useupdate_post_meta()to save invoice IDs.- Result: Data is written to the legacy
postmetatable and is ignored by WooCommerce once HPOS is authoritative.
3. Legacy Query Logic (Renumerate/Reports)
Inincludes/pdf-invoices/class-wcj-pdf-invoicing-renumerate-tool.php(lines 208, 241, 479), the code still filters by'post_type' => 'shop_order'.- Result: These tools return zero results because HPOS orders are no longer stored as WordPress posts.
The only way to keep the plugin functional currently is to keep Synchronization (Compatibility Mode) enabled, which negates the performance benefits of HPOS.
Could the development team please review these specific files and any similare relevant files that I’ve missed, and transition these calls to the WooCommerce CRUD API to ensure the “Compatible” declaration is accurate?
Many thanks.
The page I need help with: [log in to see the link]
- Result: These return empty values in HPOS Authoritative mode because the data is stored in
You must be logged in to reply to this topic.