Automattic\WooCommerce\Internal\Features

FeaturesController::feature_is_enabled_by_default()privateWC 1.0

Check if a given feature is enabled by default.

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

No Hooks.

Return

true|false. TRUE if the feature is enabled by default, FALSE otherwise.

Usage

// private - for code of main (parent) class only
$result = $this->feature_is_enabled_by_default( $feature_id ): bool;
$feature_id(string) (required)
Unique feature id.

Code of FeaturesController::feature_is_enabled_by_default() WC 7.1.0

private function feature_is_enabled_by_default( string $feature_id ): bool {
	return ! empty( $this->features[ $feature_id ]['enabled_by_default'] );
}