Skip to content

Commit ceb0e0e

Browse files
authored
Merge pull request #110 from woocommerce/add/hpos-compat
Declare compatibility with HPOS
2 parents 2bec9cb + e9c8f37 commit ceb0e0e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

wc-smooth-generator.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,12 @@ function load_wc_smooth_generator() {
5050
if ( version_compare( PHP_VERSION, '5.3', '>' ) ) {
5151
add_action( 'plugins_loaded', 'load_wc_smooth_generator', 20 );
5252
}
53+
54+
/**
55+
* Declare HPOS compatibility.
56+
*/
57+
add_action( 'before_woocommerce_init', function() {
58+
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
59+
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
60+
}
61+
} );

0 commit comments

Comments
 (0)