Move the LYS feature flag check inside add_lys_default_values() (#46154)
* Move the feature flag check to add_lys_default_values method * Add changelog * Revert changes * Fix bug in login functionality
This commit is contained in:
parent
90c082aafb
commit
4c3d6ffa6b
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
Move the feature flag check to add_lys_default_values method
|
|
@ -254,11 +254,8 @@ final class WooCommerce {
|
||||||
add_action( 'woocommerce_updated', array( $this, 'add_woocommerce_inbox_variant' ) );
|
add_action( 'woocommerce_updated', array( $this, 'add_woocommerce_inbox_variant' ) );
|
||||||
add_action( 'woocommerce_installed', array( $this, 'add_woocommerce_remote_variant' ) );
|
add_action( 'woocommerce_installed', array( $this, 'add_woocommerce_remote_variant' ) );
|
||||||
add_action( 'woocommerce_updated', array( $this, 'add_woocommerce_remote_variant' ) );
|
add_action( 'woocommerce_updated', array( $this, 'add_woocommerce_remote_variant' ) );
|
||||||
|
add_action( 'woocommerce_newly_installed', array( $this, 'add_lys_default_values' ) );
|
||||||
if ( Features::is_enabled( 'launch-your-store' ) ) {
|
add_action( 'woocommerce_updated', array( $this, 'add_lys_default_values' ) );
|
||||||
add_action( 'woocommerce_newly_installed', array( $this, 'add_lys_default_values' ) );
|
|
||||||
add_action( 'woocommerce_updated', array( $this, 'add_lys_default_values' ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
// These classes set up hooks on instantiation.
|
// These classes set up hooks on instantiation.
|
||||||
$container = wc_get_container();
|
$container = wc_get_container();
|
||||||
|
@ -318,6 +315,10 @@ final class WooCommerce {
|
||||||
* Set default option values for launch your store task.
|
* Set default option values for launch your store task.
|
||||||
*/
|
*/
|
||||||
public function add_lys_default_values() {
|
public function add_lys_default_values() {
|
||||||
|
if ( ! Features::is_enabled( 'launch-your-store' ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$is_new_install = current_action() === 'woocommerce_newly_installed';
|
$is_new_install = current_action() === 'woocommerce_newly_installed';
|
||||||
|
|
||||||
$coming_soon = $is_new_install ? 'yes' : 'no';
|
$coming_soon = $is_new_install ? 'yes' : 'no';
|
||||||
|
@ -431,7 +432,6 @@ final class WooCommerce {
|
||||||
* The SSR in the name is preserved for bw compatibility, as this was initially used in System Status Report.
|
* The SSR in the name is preserved for bw compatibility, as this was initially used in System Status Report.
|
||||||
*/
|
*/
|
||||||
$this->define( 'WC_SSR_PLUGIN_UPDATE_RELEASE_VERSION_TYPE', 'none' );
|
$this->define( 'WC_SSR_PLUGIN_UPDATE_RELEASE_VERSION_TYPE', 'none' );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue