Automattic\WooCommerce\Admin\Features
Features::maybe_disable_features
Disable features when opting out of tracking.
Method of the class: Features{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = Features::maybe_disable_features( $old_value, $value );
- $old_value(string) (required)
- Old value.
- $value(string) (required)
- New value.
Features::maybe_disable_features() Features::maybe disable features code WC 10.6.2
public static function maybe_disable_features( $old_value, $value ) {
if ( 'yes' === $value ) {
return;
}
foreach ( self::$beta_features as $feature ) {
self::disable( $feature );
}
}