Skip to content

Commit 9a184df

Browse files
authored
Merge pull request #182 from WebDevStudios/feature/CC-410-HPOS-compatibility
declare compatibility with HPOS
2 parents 00a8477 + 6e9fbc2 commit 9a184df

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plugin.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,13 @@
3131

3232
$cc_woo_plugin = new \WebDevStudios\CCForWoo\Plugin( __FILE__ );
3333
$cc_woo_plugin->run();
34+
35+
// Declare compatibility with custom order tables for WooCommerce.
36+
add_action(
37+
'before_woocommerce_init',
38+
function () {
39+
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
40+
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
41+
}
42+
}
43+
);

0 commit comments

Comments
 (0)