Automattic\WooCommerce\Blocks\Domain\Services

GoogleAnalytics::init()publicWC 1.0

Hook into WP.

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

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$GoogleAnalytics = new GoogleAnalytics();
$GoogleAnalytics->init();

Код GoogleAnalytics::init() WC 8.7.0

public function init() {
	// Require Google Analytics Integration to be activated.
	if ( ! class_exists( 'WC_Google_Analytics_Integration', false ) ) {
		return;
	}
	add_action( 'init', array( $this, 'register_assets' ) );
	add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
	add_filter( 'script_loader_tag', array( $this, 'async_script_loader_tags' ), 10, 3 );
}