WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Notes

TrackingOptIn::opt_in_to_tracking() public WC 1.0

Opt in to usage tracking when note is actioned.

{} It's a method of the class: TrackingOptIn{}

No Hooks.

Return

null. Nothing.

Usage

$TrackingOptIn = new TrackingOptIn();
$TrackingOptIn->opt_in_to_tracking( $note );
$note(Note) (required)
Note being acted upon.

Code of TrackingOptIn::opt_in_to_tracking() WC 5.3.0

<?php
public function opt_in_to_tracking( $note ) {
	if ( self::NOTE_NAME === $note->get_name() ) {
		// Opt in to tracking and schedule the first data update.
		// Same mechanism as in WC_Admin_Setup_Wizard::wc_setup_store_setup_save().
		update_option( 'woocommerce_allow_tracking', 'yes' );
		wp_schedule_single_event( time() + 10, 'woocommerce_tracker_send_event', array( true ) );
	}
}