Automattic\WooCommerce\Admin\Features

Features::maybe_disable_features()public staticWC 1.0

Disable features when opting out of tracking.

Метод класса: Features{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = Features::maybe_disable_features( $old_value, $value );
$old_value(строка) (обязательный)
Old value.
$value(строка) (обязательный)
New value.

Код Features::maybe_disable_features() 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 );
	}
}