Add use-wp-horizon feature flag (#51421)
* Add use-wp-horizon feature flag * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
2ce234217a
commit
00dcadac4c
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: add
|
||||||
|
|
||||||
|
Add use-wp-horizon feature flag to set calpyso_env to horizon
|
|
@ -39,6 +39,7 @@
|
||||||
"launch-your-store": true,
|
"launch-your-store": true,
|
||||||
"product-editor-template-system": false,
|
"product-editor-template-system": false,
|
||||||
"blueprint": false,
|
"blueprint": false,
|
||||||
"reactify-classic-payments-settings": false
|
"reactify-classic-payments-settings": false,
|
||||||
|
"use-wp-horizon": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
"launch-your-store": true,
|
"launch-your-store": true,
|
||||||
"product-editor-template-system": false,
|
"product-editor-template-system": false,
|
||||||
"blueprint": true,
|
"blueprint": true,
|
||||||
"reactify-classic-payments-settings": false
|
"reactify-classic-payments-settings": false,
|
||||||
|
"use-wp-horizon": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ defined( 'ABSPATH' ) || exit;
|
||||||
|
|
||||||
use ActionScheduler;
|
use ActionScheduler;
|
||||||
use Automattic\Jetpack\Connection\Manager;
|
use Automattic\Jetpack\Connection\Manager;
|
||||||
|
use Automattic\WooCommerce\Admin\Features\Features;
|
||||||
use Automattic\WooCommerce\Admin\PluginsHelper;
|
use Automattic\WooCommerce\Admin\PluginsHelper;
|
||||||
use Automattic\WooCommerce\Admin\PluginsInstallLoggers\AsynPluginsInstallLogger;
|
use Automattic\WooCommerce\Admin\PluginsInstallLoggers\AsynPluginsInstallLogger;
|
||||||
use WC_REST_Data_Controller;
|
use WC_REST_Data_Controller;
|
||||||
|
@ -238,6 +239,10 @@ class OnboardingPlugins extends WC_REST_Data_Controller {
|
||||||
$redirect_url = $request->get_param( 'redirect_url' );
|
$redirect_url = $request->get_param( 'redirect_url' );
|
||||||
$calypso_env = defined( 'WOOCOMMERCE_CALYPSO_ENVIRONMENT' ) && in_array( WOOCOMMERCE_CALYPSO_ENVIRONMENT, [ 'development', 'wpcalypso', 'horizon', 'stage' ], true ) ? WOOCOMMERCE_CALYPSO_ENVIRONMENT : 'production';
|
$calypso_env = defined( 'WOOCOMMERCE_CALYPSO_ENVIRONMENT' ) && in_array( WOOCOMMERCE_CALYPSO_ENVIRONMENT, [ 'development', 'wpcalypso', 'horizon', 'stage' ], true ) ? WOOCOMMERCE_CALYPSO_ENVIRONMENT : 'production';
|
||||||
|
|
||||||
|
if ( Features::is_enabled( 'use-wp-horizon' ) ) {
|
||||||
|
$calypso_env = 'horizon';
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'success' => ! $errors->has_errors(),
|
'success' => ! $errors->has_errors(),
|
||||||
'errors' => $errors->get_error_messages(),
|
'errors' => $errors->get_error_messages(),
|
||||||
|
|
Loading…
Reference in New Issue