Automattic\WooCommerce\Internal\Admin

Analytics::__construct()publicWC 1.0

Hook into WooCommerce.

{} Это метод класса: Analytics{}

Хуков нет.

Возвращает

null. Ничего.

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

$Analytics = new Analytics();
$Analytics->__construct();

Код Analytics::__construct() WC 6.9.1

public function __construct() {
	add_filter( 'woocommerce_settings_features', array( $this, 'add_feature_toggle' ) );
	add_action( 'update_option_' . self::TOGGLE_OPTION_NAME, array( $this, 'reload_page_on_toggle' ), 10, 2 );
	add_action( 'woocommerce_settings_saved', array( $this, 'maybe_reload_page' ) );

	if ( ! Features::is_enabled( 'analytics' ) ) {
		return;
	}

	add_filter( 'woocommerce_component_settings_preload_endpoints', array( $this, 'add_preload_endpoints' ) );
	add_filter( 'woocommerce_admin_get_user_data_fields', array( $this, 'add_user_data_fields' ) );
	add_action( 'admin_menu', array( $this, 'register_pages' ) );
	add_filter( 'woocommerce_debug_tools', array( $this, 'register_cache_clear_tool' ) );
}