Automattic\WooCommerce\Internal\Features
FeaturesController::is_legacy_feature()
Checks whether a feature id corresponds to a legacy feature (a feature that existed prior to the implementation of the features engine).
Метод класса: FeaturesController{}
Хуков нет.
Возвращает
true|false
. True if the id corresponds to a legacy feature.
Использование
$FeaturesController = new FeaturesController(); $FeaturesController->is_legacy_feature( $feature_id ): bool;
- $feature_id(строка) (обязательный)
- The feature id to check.
Код FeaturesController::is_legacy_feature() FeaturesController::is legacy feature WC 9.7.1
public function is_legacy_feature( string $feature_id ): bool { $features = $this->get_feature_definitions(); return ! empty( $features[ $feature_id ]['is_legacy'] ); }