Add declare compatibility functions to beta tester (#38393)

* Add declare compatibility for custom order table and product block editor features

* Add changelog

* Fix PHP lint errors
This commit is contained in:
louwie17 2023-05-25 05:06:06 -03:00 committed by GitHub
parent af26209886
commit 4db856db05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: update
Declare compatibility for custom order table and product block editor features.

View File

@ -122,3 +122,13 @@ function add_extension_register_script() {
}
add_action( 'admin_enqueue_scripts', 'add_extension_register_script' );
add_action(
'before_woocommerce_init',
function() {
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'product_block_editor', __FILE__, true );
}
}
);