Automattic\WooCommerce\Utilities
FeaturesUtil::log_deprecated_feature_usage
Log usage of a deprecated feature.
This method ensures logging only happens once per request to avoid spam.
Метод класса: FeaturesUtil{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = FeaturesUtil::log_deprecated_feature_usage( $feature_id, $deprecated_since ): void;
- $feature_id(строка) (обязательный)
- The feature id being checked.
- $deprecated_since(строка) (обязательный)
- The version since which the feature is deprecated.
Код FeaturesUtil::log_deprecated_feature_usage() FeaturesUtil::log deprecated feature usage WC 11.2.2
private static function log_deprecated_feature_usage( string $feature_id, string $deprecated_since ): void {
static $logged = array();
if ( isset( $logged[ $feature_id ] ) ) {
return;
}
$logged[ $feature_id ] = true;
wc_deprecated_function(
"FeaturesUtil::feature_is_enabled('{$feature_id}')",
$deprecated_since
);
}