Skip to content

Commit b026401

Browse files
authored
Merge pull request #1742 from woocommerce/hpos-compatibility-declaration
Declare compatibility for High Performance Order Storage
2 parents 3558442 + f282149 commit b026401

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

google-listings-and-ads.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use Automattic\WooCommerce\GoogleListingsAndAds\Internal\Requirements\PluginValidator;
2525
use Automattic\WooCommerce\GoogleListingsAndAds\Internal\Requirements\VersionValidator;
2626
use Automattic\WooCommerce\GoogleListingsAndAds\PluginFactory;
27+
use Automattic\WooCommerce\Utilities\FeaturesUtil;
2728
use Psr\Container\ContainerInterface;
2829

2930
defined( 'ABSPATH' ) || exit;
@@ -51,6 +52,16 @@ function () {
5152
}
5253
);
5354

55+
// HPOS compatibility declaration.
56+
add_action(
57+
'before_woocommerce_init',
58+
function () {
59+
if ( class_exists( FeaturesUtil::class ) ) {
60+
FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__ );
61+
}
62+
}
63+
);
64+
5465
// Hook much of our plugin after WooCommerce is loaded.
5566
add_action(
5667
'woocommerce_loaded',

0 commit comments

Comments
 (0)