Skip to content

Commit 6e9fbc2

Browse files
committed
declare compatibility with HPOS
1 parent c4bf8cc commit 6e9fbc2

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)