diff --git a/plugins/woocommerce/changelog/dev-39780_disable_the_new_editor_for_variable_products b/plugins/woocommerce/changelog/dev-39780_disable_the_new_editor_for_variable_products new file mode 100644 index 00000000000..3cbbc2e591a --- /dev/null +++ b/plugins/woocommerce/changelog/dev-39780_disable_the_new_editor_for_variable_products @@ -0,0 +1,4 @@ +Significance: minor +Type: dev + +[Product Block Editor] Disable the new editor for variable products. diff --git a/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php b/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php index c66b4a93733..646e6dff9b8 100644 --- a/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php +++ b/plugins/woocommerce/src/Admin/Features/ProductBlockEditor/Init.php @@ -25,7 +25,7 @@ class Init { * * @var array */ - private $supported_post_types = array( 'simple', 'variable' ); + private $supported_post_types = array( 'simple' ); /** * Redirection controller. @@ -38,6 +38,10 @@ class Init { * Constructor */ public function __construct() { + if ( Features::is_enabled( 'product-variation-management' ) ) { + array_push($this->supported_post_types, 'variable'); + } + $this->redirection_controller = new RedirectionController( $this->supported_post_types ); if ( \Automattic\WooCommerce\Utilities\FeaturesUtil::feature_is_enabled( 'product_block_editor' ) ) {