Automattic\WooCommerce\Blocks\Domain\Services

GoogleAnalytics::get_google_analytics_settings()privateWC 1.0

Get settings from the GA integration extension.

Method of the class: GoogleAnalytics{}

No Hooks.

Return

Array.

Usage

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

GoogleAnalytics::get_google_analytics_settings() code WC 8.7.0

private function get_google_analytics_settings() {
	return wp_parse_args(
		get_option( 'woocommerce_google_analytics_settings' ),
		[
			'ga_id'                     => '',
			'ga_event_tracking_enabled' => 'no',
		]
	);
}