Enabling High Performance Order Storage (HPOS) - woocommerce/woocommerce-gateway-stripe GitHub Wiki

NOTE: Support for HPOS is experimental at the moment. These instructions are for testing and development purposes only.

  1. Create a new store.
  2. Install and setup, WooCommerce, the WooCommerce Stripe Payment Gateway, and Code Snippets.
  3. 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();
	}
});
  1. Save the snippet and make sure it's active everywhere.

image

  1. Go to WooCommerce → Settings.
  2. Go to Advanced.
  3. Go to Features.
  4. Enable the High-Performance Order Storage (COT) feature and click Save changes.

image

  1. Go to Custom data stores.
  2. 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
image image
  1. Enable Use the WooCommerce orders tables, make sure Keep the posts table and the orders tables synchronized is disabled, and click Save changes.

image

⚠️ **GitHub.com Fallback** ⚠️