Automattic\WooCommerce\Internal\Admin

Analytics::reload_page_on_toggle()public staticWC 1.0

Reloads the page when the option is toggled to make sure all Analytics features are loaded.

Method of the class: Analytics{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = Analytics::reload_page_on_toggle( $old_value, $value );
$old_value(string) (required)
Old value.
$value(string) (required)
New value.

Analytics::reload_page_on_toggle() code WC 8.7.0

public static function reload_page_on_toggle( $old_value, $value ) {
	if ( $old_value === $value ) {
		return;
	}

	self::$is_updated = true;
}