Automattic\WooCommerce\Internal\Admin

FeaturePlugin::is_analytics_enabled_during_bootstrap │ private │ WC 1.0

Check whether Analytics should be initialized during plugin bootstrap.

Feature definitions contain translated presentation strings and are not safe to build before init.

Method of the class: FeaturePlugin{}

No Hooks.

Returns

bool.

Usage

// private - for code of main (parent) class only
$result = $this->is_analytics_enabled_during_bootstrap(): bool;

FeaturePlugin::is_analytics_enabled_during_bootstrap() code WC 11.1.2

private function is_analytics_enabled_during_bootstrap(): bool {
	// Keep this fallback aligned with `enabled_by_default` for Analytics in FeaturesController.
	return ! Features::is_analytics_disabled_by_legacy_filters()
		&& 'yes' === get_option( Analytics::TOGGLE_OPTION_NAME, 'yes' );
}