-
Notifications
You must be signed in to change notification settings - Fork 207
Enabling High Performance Order Storage (HPOS)
César Costa edited this page Jan 24, 2023
·
3 revisions
NOTE: Support for HPOS is experimental at the moment. These instructions are for testing and development purposes only.
- Create a new store.
- Install and setup, WooCommerce, the WooCommerce Stripe Payment Gateway, and Code Snippets.
- Go to Snippets → Add new and create a snippet with the following code:
add_action( 'woocommerce_init', function () {
if ( class_exists('\Automattic\WooCommerce\Utilities\FeaturesUtil') ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::allow_enabling_features_with_incompatible_plugins();
\Automattic\WooCommerce\Utilities\FeaturesUtil::allow_activating_plugins_with_incompatible_features();
}
});
- Save the snippet and make sure it's active everywhere.
- Go to WooCommerce → Settings.
- Go to Advanced.
- Go to Features.
- Enable the High-Performance Order Storage (COT) feature and click Save changes.
- Go to Custom data stores.
- If you see a warning saying "There are orders pending sync!":
- Enable Keep the posts table and the orders tables synchronized and click Save changes. The warning will say synchronization is in progress.
- Wait for ~1 minute and then reload the page. Repeat until the warning goes away.
Before | After |
---|---|
- Enable Use the WooCommerce orders tables, make sure Keep the posts table and the orders tables synchronized is disabled, and click Save changes.