Check if features are currently being enabled (https://github.com/woocommerce/woocommerce-admin/pull/6688)

* Check if features are currently being enabled

* Add changelog entry
This commit is contained in:
Joshua T Flowers 2021-03-26 12:19:38 -04:00 committed by GitHub
parent 46a5cab581
commit 922522542e
2 changed files with 9 additions and 1 deletions

View File

@ -79,6 +79,7 @@ Release and roadmap notes are available on the [WooCommerce Developers Blog](htt
== 2.2.0 3/26/2021 ==
- Fix: Check if features are currently being enabled #6688
- Add: Next new novel navigation nudge note #6610
- Fix: Fix the activity panel toggle not closing on click #6679
- Tweak: Add default value for contains op #6622

View File

@ -130,7 +130,14 @@ class Features {
$features = self::get_beta_feature_options();
if ( isset( $features[ $feature ] ) ) {
return 'yes' === get_option( $features[ $feature ], 'no' );
$feature_option = $features[ $feature ];
// Check if the feature is currently being enabled.
/* phpcs:disable WordPress.Security.NonceVerification */
if ( isset( $_POST[ $feature_option ] ) && '1' === $_POST[ $feature_option ] ) {
return true;
}
return 'yes' === get_option( $feature_option, 'no' );
}
return true;