I synced my orders with HPOS Sync via Woocommerce Settings > Advanced > Features
page but didn’t switch to HPOS and did not check – Enable compatibility mode (synchronizes orders to the posts table)
option.
Due to this, post
& postmeta
tables and HPOS tables are out of sync again as after initial sync, only postmeta
and post
tables were updated as compatibility mode was not enabled.
How to re-sync the previously synced orders that have become out of sync as postmeta
was updated after initial sync?
First, always make a database backup.
Go to WooCommerce Settings > Advanced > Features > Order data storage (section):
Enable only "WordPress posts storage (legacy)" option, and save.
Go to WooCommerce Status > Tools > Delete the custom orders tables (section):
Click on the delete button.
Go back to WooCommerce Settings > Advanced > Features > Order data storage (section):
Click on "Sync XXX pending orders" link
Then click on "Enable compatibility mode (synchronizes orders to the posts table)", and save.
Now the WooCommerce Action Scheduler will sync orders by batch, each hour.
Once done, you can switch to "High-performance order storage (recommended)" option and save.