FeaturesController::feature_enable_option_name()publicWC 1.0

Get the name of the option that enables/disables a given feature. Note that it doesn't check if the feature actually exists.

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

No Hooks.


String. The option that enables or disables the feature.


$FeaturesController = new FeaturesController();
$FeaturesController->feature_enable_option_name( $feature_id ): string;
$feature_id(string) (required)
The id of the feature.

Код FeaturesController::feature_enable_option_name() WC 7.1.0

public function feature_enable_option_name( string $feature_id ): string {
	if ( 'analytics' === $feature_id ) {
		return Analytics::TOGGLE_OPTION_NAME;
	} elseif ( 'new_navigation' === $feature_id ) {
		return Init::TOGGLE_OPTION_NAME;

	return "woocommerce_feature_${feature_id}_enabled";