Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark compatible with High-Performance Order Storage (HPOS) #28

Open
gaambo opened this issue Oct 24, 2023 · 1 comment
Open

Mark compatible with High-Performance Order Storage (HPOS) #28

gaambo opened this issue Oct 24, 2023 · 1 comment

Comments

@gaambo
Copy link

gaambo commented Oct 24, 2023

Since WooCommerce 8.2 the new HPOS is marked as stable and enabled by default on new pages.
This plugin is not yet marked as compatible with the new HPOS, and therefore if this plugin is enabled, HPOS can't be enabled.

As far as I can see, the plugin does not anywhere work with orders/shop_orders. I also used the audit methods suggested by WooCommerce and can't find any usage of those.
I also enabled HPOS via the database while the plugin is enabled and couldn't find any errors.

So I think it should be as easy as just declaring compatibility

add_action( 'before_woocommerce_init', function() {
	if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
		\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
	}
} );

No other backwards-compatibility checks are necessary, since there's just no integration with orders.

I can submit a PR, if you're willing to merge. But it's just the lines above to put into the plugin 😅

@dalmadima
Copy link

please mark this plugin compatible with HPOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants