From 4db856db05fe308e589a159a3cd6ea312ecc4acc Mon Sep 17 00:00:00 2001 From: louwie17 Date: Thu, 25 May 2023 05:06:06 -0300 Subject: [PATCH] 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 --- .../changelog/update-beta_tester_feature_compatibility | 4 ++++ .../woocommerce-beta-tester.php | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 plugins/woocommerce-beta-tester/changelog/update-beta_tester_feature_compatibility diff --git a/plugins/woocommerce-beta-tester/changelog/update-beta_tester_feature_compatibility b/plugins/woocommerce-beta-tester/changelog/update-beta_tester_feature_compatibility new file mode 100644 index 00000000000..96d810870a0 --- /dev/null +++ b/plugins/woocommerce-beta-tester/changelog/update-beta_tester_feature_compatibility @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Declare compatibility for custom order table and product block editor features. diff --git a/plugins/woocommerce-beta-tester/woocommerce-beta-tester.php b/plugins/woocommerce-beta-tester/woocommerce-beta-tester.php index 9eb79c1a58f..d6cd3fc72f2 100644 --- a/plugins/woocommerce-beta-tester/woocommerce-beta-tester.php +++ b/plugins/woocommerce-beta-tester/woocommerce-beta-tester.php @@ -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 ); + } + } +);