Automattic\WooCommerce\Blocks\Domain\Services
GoogleAnalytics::get_google_analytics_settings
Get settings from the GA integration extension.
Method of the class: GoogleAnalytics{}
No Hooks.
Returns
Array.
Usage
// private - for code of main (parent) class only $result = $this->get_google_analytics_settings();
GoogleAnalytics::get_google_analytics_settings() GoogleAnalytics::get google analytics settings code WC 10.8.1
private function get_google_analytics_settings() {
return wp_parse_args(
get_option( 'woocommerce_google_analytics_settings' ),
[
'ga_id' => '',
'ga_event_tracking_enabled' => 'no',
]
);
}