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
0036b4d293
commit
160b3e3ca7
|
@ -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,
|
||||
"product-editor-template-system": 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,
|
||||
"product-editor-template-system": false,
|
||||
"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 Automattic\Jetpack\Connection\Manager;
|
||||
use Automattic\WooCommerce\Admin\Features\Features;
|
||||
use Automattic\WooCommerce\Admin\PluginsHelper;
|
||||
use Automattic\WooCommerce\Admin\PluginsInstallLoggers\AsynPluginsInstallLogger;
|
||||
use WC_REST_Data_Controller;
|
||||
|
@ -238,6 +239,10 @@ class OnboardingPlugins extends WC_REST_Data_Controller {
|
|||
$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';
|
||||
|
||||
if ( Features::is_enabled( 'use-wp-horizon' ) ) {
|
||||
$calypso_env = 'horizon';
|
||||
}
|
||||
|
||||
return [
|
||||
'success' => ! $errors->has_errors(),
|
||||
'errors' => $errors->get_error_messages(),
|
||||
|
|
Loading…
Reference in New Issue