Automattic\WooCommerce\Internal\LegacyAssets

LegacySelect2UsageTracker::is_frontend_tracking_available │ protected │ WC 11.0.0

Whether the WooCommerce Analytics storefront tracker is initialized.

Method of the class: LegacySelect2UsageTracker{}

No Hooks.

Returns

bool.

Usage

// protected - for code of main (parent) or child class
$result = $this->is_frontend_tracking_available(): bool;

Changelog

Since 11.0.0 Introduced.

LegacySelect2UsageTracker::is_frontend_tracking_available() code WC 11.2.1

protected function is_frontend_tracking_available(): bool {
	return did_action( 'woocommerce_analytics_init' )
		&& class_exists( WC_Analytics_Tracking::class )
		&& is_callable( array( WC_Analytics_Tracking::class, 'add_event_to_queue' ) );
}