diff --git a/plugins/woocommerce/changelog/add-36413-support-for-cart-checkout-in-declare-compatibility b/plugins/woocommerce/changelog/add-36413-support-for-cart-checkout-in-declare-compatibility new file mode 100644 index 00000000000..7724faa14f5 --- /dev/null +++ b/plugins/woocommerce/changelog/add-36413-support-for-cart-checkout-in-declare-compatibility @@ -0,0 +1,4 @@ +Significance: minor +Type: enhancement + +Add the support for the C&C Blocks in declaring compatibility feature diff --git a/plugins/woocommerce/src/Internal/Features/FeaturesController.php b/plugins/woocommerce/src/Internal/Features/FeaturesController.php index 8096f284da2..8011280ec2b 100644 --- a/plugins/woocommerce/src/Internal/Features/FeaturesController.php +++ b/plugins/woocommerce/src/Internal/Features/FeaturesController.php @@ -95,21 +95,31 @@ class FeaturesController { 'description' => __( 'Enables WooCommerce Analytics', 'woocommerce' ), 'is_experimental' => false, 'enabled_by_default' => true, + 'disable_ui' => false, ), 'new_navigation' => array( 'name' => __( 'Navigation', 'woocommerce' ), 'description' => __( 'Adds the new WooCommerce navigation experience to the dashboard', 'woocommerce' ), 'is_experimental' => false, + 'disable_ui' => false, ), 'new_product_management' => array( 'name' => __( 'New product editor', 'woocommerce' ), 'description' => __( 'Try the new product editor (Beta)', 'woocommerce' ), 'is_experimental' => true, + 'disable_ui' => false, ), 'custom_order_tables' => array( 'name' => __( 'High-Performance order storage (COT)', 'woocommerce' ), 'description' => __( 'Enable the high performance order storage feature.', 'woocommerce' ), 'is_experimental' => true, + 'disable_ui' => false, + ), + 'cart_checkout_blocks' => array( + 'name' => __( 'Cart & Checkout Blocks', 'woocommerce' ), + 'description' => __( 'Optimize for faster checkout', 'woocommerce' ), + 'is_experimental' => false, + 'disable_ui' => true, ), ); @@ -577,6 +587,10 @@ class FeaturesController { continue; } + if ( isset( $features[ $id ]['disable_ui'] ) && $features[ $id ]['disable_ui'] ) { + continue; + } + $feature_settings[] = $this->get_setting_for_feature( $id, $features[ $id ], $admin_features_disabled ); }