Automattic\WooCommerce\Admin\Features

Features::maybe_disable_features()public staticWC 1.0

Disable features when opting out of tracking.

Method of the class: Features{}

No Hooks.

Return

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() code WC 8.7.0

public static function maybe_disable_features( $old_value, $value ) {
	if ( 'yes' === $value ) {
		return;
	}

	foreach ( self::$beta_features as $feature ) {
		self::disable( $feature );
	}
}